From 3855e7023f32d0d9ded24e008e78c61d5cf5a776 Mon Sep 17 00:00:00 2001 From: Danny Weinberg Date: Mon, 5 Dec 2016 14:30:14 -0800 Subject: [PATCH] Ignore a stub class that extends Any (#745) Ignore a stub class that extends Any so that programs can use `--disallow-subclassing-any`. --- stdlib/3/types.pyi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stdlib/3/types.pyi b/stdlib/3/types.pyi index 4a0da754e..fe34809a5 100644 --- a/stdlib/3/types.pyi +++ b/stdlib/3/types.pyi @@ -68,7 +68,8 @@ class MappingProxyType(Mapping[_KT, _VT], Generic[_KT, _VT]): def __iter__(self) -> Iterator[_KT]: ... def __len__(self) -> int: ... -class SimpleNamespace(Any): ... +# TODO: use __getattr__ and __setattr__ instead of inheriting from Any, pending mypy#521. +class SimpleNamespace(Any): ... # type: ignore class GeneratorType: gi_code = ... # type: CodeType