Inconsistency for [func-returns-value]
: Error not reported for staticmethod
s
#14179
Labels
bug
mypy got something wrong
Bug Report
Static methods decorated with
staticmethod
that returnNone
do not result in a[func-returns-value]
error being reported.To Reproduce
https://mypy-play.net/?mypy=latest&python=3.11&gist=519f480fe4f8840e0043c2555f951f2f
Expected Behavior
A static method is just another callable and it makes sense for the behavior of the
[func-returns-value]
error to be the same for it as for other callables.Actual Behavior
The behavior of the
[func-returns-value]
error for decorated static methods is different from that for other callables. No error is reported.Your Environment
mypy.ini
(and other config files): NoneThe text was updated successfully, but these errors were encountered: