Use Incomplete instead of Any in __getattr__ (#8903)

This commit is contained in:
Nikita Sobolev
2022-10-15 20:54:21 +03:00
committed by GitHub
parent ed4bc2b2e6
commit ce4668a132
64 changed files with 157 additions and 132 deletions

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