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
% mypy --config=/dev/null test_case.py
/dev/null: No [mypy] section in config file
test_case.py:54: error: Value of type variable "TermT" of "do_something_or_something_else" cannot be "Callable[[], object]"
test_case.py:55: error: Value of type variable "TermT" of "do_something_or_something_else" cannot be "Callable[[], object]"
test_case.py:60: error: Value of type variable "TermT" of "do_something_or_something_else" cannot be "Callable[[], object]"
test_case.py:61: error: Value of type variable "TermT" of "do_something_or_something_else" cannot be "Callable[[], object]"
Found 4 errors in 1 file (checked 1 source file)
% python --version
Python 3.9.10
% mypy --version
mypy 0.931
% mypy --config=/dev/null test_case.py
If I s/TermT/ReturnsFooOrBarT/g, the errors go away. The above is a contrived example, but having a TypeVar is helpful when returning a function of the same type that was provided (e.g., with a decorator).
Uh oh!
There was an error while loading. Please reload this page.
If I
s/TermT/ReturnsFooOrBarT/g
, the errors go away. The above is a contrived example, but having aTypeVar
is helpful when returning a function of the same type that was provided (e.g., with a decorator).Possibly related to #8922 or #9075?
The text was updated successfully, but these errors were encountered: