mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-23 20:31:32 +08:00
Use Incomplete instead of Any in __getattr__ (#8903)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user