Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions test-data/unit/check-errorcodes.test
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,15 @@ y = A().g() # E: "g" of "A" does not return a value (it only ever returns None)
c: Callable[[], None]
z = c() # E: Function does not return a value (it only ever returns None) [func-returns-value]

[case testErrorCodeStaticmethodDoesNotReturnValue-xfail]
# See: https://github.com/python/mypy/issues/14179
class A:
@staticmethod
def g() -> None: pass

y1 = A.g() # E: "g" of "A" does not return a value (it only ever returns None) [func-returns-value]
y2 = A().g() # E: "g" of "A" does not return a value (it only ever returns None) [func-returns-value]

[case testErrorCodeInstantiateAbstract]
from abc import abstractmethod

Expand Down
Loading