mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Fix some stubtest complaints before they happen (#9585)
Add missing objects to various stubs
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import sys
|
||||
from lib2to3.pgen2.grammar import Grammar
|
||||
|
||||
class Symbols:
|
||||
@@ -110,4 +111,6 @@ class pattern_symbols(Symbols):
|
||||
|
||||
python_grammar: Grammar
|
||||
python_grammar_no_print_statement: Grammar
|
||||
if sys.version_info >= (3, 8):
|
||||
python_grammar_no_print_and_exec_statement: Grammar
|
||||
pattern_grammar: Grammar
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import inspect
|
||||
from builtins import dict as _dict # alias to avoid conflicts with attribute name
|
||||
from collections.abc import Callable, Iterator
|
||||
from contextlib import _GeneratorContextManager
|
||||
from inspect import Signature, getfullargspec as getfullargspec, iscoroutinefunction as iscoroutinefunction
|
||||
from re import Pattern
|
||||
from typing import Any, TypeVar
|
||||
from typing_extensions import ParamSpec
|
||||
from typing_extensions import Literal, ParamSpec
|
||||
|
||||
_C = TypeVar("_C", bound=Callable[..., Any])
|
||||
_Func = TypeVar("_Func", bound=Callable[..., Any])
|
||||
@@ -14,6 +15,7 @@ _P = ParamSpec("_P")
|
||||
def get_init(cls: type) -> None: ...
|
||||
|
||||
DEF: Pattern[str]
|
||||
POS: Literal[inspect._ParameterKind.POSITIONAL_OR_KEYWORD]
|
||||
|
||||
class FunctionMaker:
|
||||
args: list[str]
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
import logging
|
||||
from collections.abc import Mapping, Sequence
|
||||
from typing import IO, ClassVar
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
from .util import Context
|
||||
|
||||
logger: logging.Logger
|
||||
|
||||
class KeyValues(dict[str, str]):
|
||||
parser_attr: ClassVar[str | None]
|
||||
parser: DockerfileParser
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import logging
|
||||
import pathlib
|
||||
|
||||
logger: logging.Logger
|
||||
|
||||
class PlaysoundException(Exception): ...
|
||||
|
||||
def playsound(sound: str | pathlib.Path, block: bool = ...) -> None: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# https://pyinstaller.org/en/stable/usage.html#running-pyinstaller-from-python-code
|
||||
import logging
|
||||
from _typeshed import SupportsKeysAndGetItem
|
||||
from collections.abc import Iterable
|
||||
from typing_extensions import TypeAlias
|
||||
@@ -8,4 +9,6 @@ _PyIConfig: TypeAlias = (
|
||||
SupportsKeysAndGetItem[str, bool | str | list[str] | None] | Iterable[tuple[str, bool | str | list[str] | None]]
|
||||
)
|
||||
|
||||
logger: logging.Logger
|
||||
|
||||
def run(pyi_args: Iterable[str] | None = ..., pyi_config: _PyIConfig | None = ...) -> None: ...
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# https://pyinstaller.org/en/stable/hooks.html
|
||||
|
||||
import logging
|
||||
from _typeshed import StrOrBytesPath, StrPath
|
||||
from collections.abc import Callable, Iterable
|
||||
from typing import Any
|
||||
@@ -13,6 +14,7 @@ from PyInstaller.utils.hooks.win32 import get_pywin32_module_file_attribute as g
|
||||
|
||||
conda_support = conda
|
||||
|
||||
logger: logging.Logger
|
||||
PY_IGNORE_EXTENSIONS: set[str]
|
||||
hook_variables: dict[str, str]
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ from typing import Any, TypeVar
|
||||
|
||||
_R = TypeVar("_R")
|
||||
|
||||
logging_logger: Logger
|
||||
|
||||
def retry_call(
|
||||
f: Callable[..., _R],
|
||||
fargs: Sequence[Any] | None = ...,
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import logging
|
||||
from _typeshed import Incomplete, SupportsWrite
|
||||
from collections.abc import Iterable, Iterator
|
||||
from typing import Any, TypeVar, overload
|
||||
from typing_extensions import Literal
|
||||
|
||||
logger: logging.Logger
|
||||
DEBUG: bool
|
||||
CR: str
|
||||
LF: str
|
||||
|
||||
Reference in New Issue
Block a user