🐛 Methods converted to staticmethod
s using a decorator not treated as staticmethod
s
#13434
Labels
staticmethod
s using a decorator not treated as staticmethod
s
#13434
Bug Report
The
@staticmethod
decorator only appears to work with MyPy when used as a decorator.For example, the following code works:
However, the following code does not work:
The above code produces the following error:
To Reproduce
Expected Behavior
MyPy sees that the decorator returns a
staticmethod
and proceeds to treatMyClass.my_method
as astaticmethod
Actual Behavior
MyPy produces the following error:
The above error implies that MyPy is not treating the method as a
staticmethod
.Your Environment
mypy.ini
(and other config files): N/AThe text was updated successfully, but these errors were encountered: