Wrong overload signatures with @overload
and @staticmethod
#12566
Labels
bug
mypy got something wrong
@overload
and @staticmethod
#12566
Bug Report
When given the following file, mypy does not produce the correct signatures for the two overloads of
__call__
:To Reproduce
Run mypy on the above file. We've tested on mypy 0.942 and
mypy-0.950+dev.74df7fb1172993af3b2456765fb8368481ef0ab9
Expected Behavior
As best we can tell, the above usage is correct, and we expect mypy to find no errors in this code.
Actual Behavior
Mypy emits the following errors on this code:
If we apply the following fix to the above file to make
__call__
an instance method instead of static, it passes:Your Environment
--python-version=3.6
through 3.10mypy.ini
(and other config files): NoneThe text was updated successfully, but these errors were encountered: