-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
Description
Feature
mypy==1.18.2 is not detecting the b as extra here after the *:
from typing import overload
@overload
def some_method(a: int, **kwargs) -> None: ...
@overload
def some_method(a: str, *, b: None = None, **kwargs) -> None: ...
def some_method(a: int | str, **kwargs) -> None:
passIt may also be that due to **kwargs, that a type checker can't do anything here.
Pitch
Detecting extra overload parameters to keep code clean.