You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Base:
@staticmethod
def method(n: int) -> None:
print(n)
class Deriv(Base):
def method(self, n: int) -> None:
print(f"{n} from {self}")
Produces this:
$ mypy test_static.py
test_static.py:8: error: Signature of "method" incompatible with supertype "Base"
Found 1 error in 1 file (checked 1 source file)
When using mypy from git (mypy 0.790+dev.c231ee4fdca075582e1177a8ecea3f379ccaa784) with Python 3.8.
This is pretty similar to #4125 (attributes overwritten with properties) and could end up being fixed by #7724.
I'm still reporting the issue as I didn't see any mention of static methods in other issues.
The text was updated successfully, but these errors were encountered:
This code:
Produces this:
When using mypy from git (
mypy 0.790+dev.c231ee4fdca075582e1177a8ecea3f379ccaa784
) with Python 3.8.This is pretty similar to #4125 (attributes overwritten with properties) and could end up being fixed by #7724.
I'm still reporting the issue as I didn't see any mention of static methods in other issues.
The text was updated successfully, but these errors were encountered: