diff --git a/stdlib/3/types.pyi b/stdlib/3/types.pyi index 634ac39b0..2c1c903d6 100644 --- a/stdlib/3/types.pyi +++ b/stdlib/3/types.pyi @@ -78,8 +78,10 @@ class MappingProxyType(Mapping[_KT, _VT], Generic[_KT, _VT]): def __iter__(self) -> Iterator[_KT]: ... def __len__(self) -> int: ... -# TODO: use __getattr__ and __setattr__ instead of inheriting from Any, pending mypy#521. -class SimpleNamespace(Any): ... # type: ignore +class SimpleNamespace: + def __getattribute__(self, name: str) -> Any: ... + def __setattr__(self, name: str, value: Any) -> None: ... + def __delattr__(self, name: str) -> None: ... class GeneratorType: gi_code = ... # type: CodeType