-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
I think code like this should produce an error:
def f(x: AnyStr) -> None: ...
because there's nothing to constrain the type variable. There is a good amount of code like this in typeshed.
I'm not sure how easy this would be to implement. Maybe it should be behind a flag at first; I imagine this proposed change may lead to a lot of new errors, but it's a good way to educate people about what typevars are for.
Metadata
Metadata
Assignees
Labels
No labels