Use Incomplete instead of Any in __getattr__ (#8903)

This commit is contained in:
Nikita Sobolev authored and GitHub committed 2022-10-15 18:54:21 +01:00
1 parent ed4bc2b2e6
commit ce4668a132
64 files changed
+157 -132

No files matched your search

+4 -2
View File
@@ -362,14 +362,16 @@ Example of a partial module with a partial class `Foo` and a partially
annotated function `bar()`:
```python
def __getattr__(name: str) -> Any: ... # incomplete
from _typeshed import Incomplete
class Foo:
def __getattr__(self, name: str) -> Any: ... # incomplete
def __getattr__(self, name: str) -> Incomplete: ...
x: int
y: str
def bar(x: str, y, *, z=...): ...
def __getattr__(name: str) -> Incomplete: ...
```
## Stub file coding style