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
The first error message could be main.py:11: error: Call to untyped function "Lock.__init__" in typed context - since it's the initializer not the constructor that's the problem. Presumably it's also possible to have a typed __new__ but untyped __init__?
reveal_type(Lock.__init__) says main.py:17: note: Revealed type is 'def (self: main.Lock) -> Any'
Feature
It's possible to make a def that's simultaneously typed and untyped eg: https://mypy-play.net/?mypy=latest&python=3.9&flags=disallow-untyped-calls&gist=7946ef5bbce794503defa44284147e56
Here Lock is "untyped" but appears to be a
main.py:17: note: Revealed type is 'def () -> main.Lock'
Pitch
reveal_type
should let me know that this object has an untyped constructor:main.py:17: note: Revealed type is 'Untyped[def () -> main.Lock']
See also #5943 (comment)
this tripped up the anyio project in the definition of
anyio.Lock
agronholm/anyio#289The text was updated successfully, but these errors were encountered: