-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
Description
Bug Report
In python/typeshed#13683 I'm trying to change a type var to the following:
_I = TypeVar("_I", int, bytes, float, bool, default=Any) # possibly memoryview typesUnfortunately, mypy complains: error: TypeVar default must be one of the constraint types [misc]. While this is of course generally sound advice, a default of Any should always be permissible, as this allows memoryview to stand for any possible memoryview type. Without it, users are forced to write memoryview[Any] in every instance, which is unreasonable.
Your Environment
- Mypy version used: 1.18.2