__i<magic>__ method incompatible with __<magic>__ of superclass
オープン
@Michael0x2a がすでに取り組んでいます。
2019年1月19日 から。
bug
documentation
needs discussion
priority-1-normal
- 主要言語
- Python
- スター
- 20.6k
- フォーク
- 3.3k
- 平均マージ
- 1日 18時間
- マージ済み PR(30日)
- 54
説明
I'm recieving an a error within folowing code:
class A:
def __add__(self, other) -> int:
...
def __iadd__(self, other) -> 'A':
...
class C(A):
# error: Return type of "__iadd__" incompatible with "__add__" of supertype "A"
def __iadd__(self, other) -> 'C':
...
I'm not sure that __add__ and __iadd__ methods have to be compatible.
And, if belief to the MyPy in the signature of class A, that not produce the error, MyPy also doesn't think they have to be compatible...
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
評価
この issue はまだ評価されていません。