numbers module
オープン
まだ誰も着手していません。
stubs: incomplete
- 主要言語
- Python
- スター
- 5.1k
- フォーク
- 2.1k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 82
説明
The signature of Rational.__truediv__ is marked as the following:
First of, _ComplexLike sounds like it should be numbers.Complex. But second, the signature should be more refined :
- the divisor cannot be just any value, it has to be a number, so at a minimum
numbers.Complexinstead of Unknown. The typing signature should be(self, Complex) -> Complex. - when passing a Real as a divisor, the result cannot have an imaginary part and must be Real too. I'd go as far as saying that a Rational divisor would yield a Rational dividend. In any case, a
(self, Real) -> Realoverload should be defined. And as a bonus, a(self, Rational) -> Rationalone too.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
typeshed の numbers モジュールから始めて、Rational.truediv の宣言を調べます。現在の _ComplexLike および Unknown のアノテーションを、要求された Complex、Real、Rational のオーバーロードと比較します。スタブが要求された除数と結果の関係を表現し、関連する typeshed の検証に合格すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100