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

@@ -1,4 +1,4 @@
from _typeshed import StrOrBytesPath, StrPath
from _typeshed import Incomplete, StrOrBytesPath, StrPath
from collections.abc import Iterator
from typing import Any
from typing_extensions import TypeAlias
@@ -19,4 +19,4 @@ def guess_lexer_for_filename(_fn: StrPath, _text: str, **options: Any) -> LexerM
def guess_lexer(_text: str | bytes, **options: Any) -> Lexer: ...
# Having every lexer class here doesn't seem to be worth it
def __getattr__(name: str) -> Any: ...
def __getattr__(name: str) -> Incomplete: ...

View File

@@ -1,5 +1,5 @@
from _typeshed import Incomplete
from collections.abc import Iterator, Mapping
from typing import Any
from pygments.style import StyleMeta
from pygments.util import ClassNotFound as ClassNotFound
@@ -10,4 +10,4 @@ def get_style_by_name(name) -> StyleMeta: ...
def get_all_styles() -> Iterator[str]: ...
# Having every style class here doesn't seem to be worth it
def __getattr__(name: str) -> Any: ...
def __getattr__(name: str) -> Incomplete: ...