diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index 8b4347d9e..b6d46f556 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -1041,16 +1041,16 @@ class filter(Iterator[_T], Generic[_T]): def format(__value: object, __format_spec: str = ...) -> str: ... # TODO unicode @overload -def getattr(__o: object, name: str) -> Any: ... +def getattr(__o: object, __name: str) -> Any: ... # While technically covered by the last overload, spelling out the types for None and bool # help mypy out in some tricky situations involving type context (aka bidirectional inference) @overload -def getattr(__o: object, name: str, __default: None) -> Any | None: ... +def getattr(__o: object, __name: str, __default: None) -> Any | None: ... @overload -def getattr(__o: object, name: str, __default: bool) -> Any | bool: ... +def getattr(__o: object, __name: str, __default: bool) -> Any | bool: ... @overload -def getattr(__o: object, name: str, __default: _T) -> Any | _T: ... +def getattr(__o: object, __name: str, __default: _T) -> Any | _T: ... def globals() -> dict[str, Any]: ... def hasattr(__obj: object, __name: str) -> bool: ... def hash(__obj: object) -> int: ...