-
Notifications
You must be signed in to change notification settings - Fork 283
Open
Labels
Description
Describe the Bug
class Getter[T]:
def get[S=None](self, default: S = None) -> T | S: ...
def test(arg: Getter[str]) -> None:
result: str = arg.get() ERROR sandbox.py:2:40-44: Default `None` is not assignable to parameter `default` with type `S` [bad-function-definition]
I believe this is both a false positive on line 2 and a false negative on line 5. See python/typing#2213
Sandbox Link
(Only applicable for extension issues) IDE Information
No response
Reactions are currently unavailable