mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-25 04:16:44 +08:00
Fix non-subscriptable type aliases (#993)
This commit is contained in:
committed by
Guido van Rossum
parent
52da2a176b
commit
b430318ac0
@@ -1,6 +1,6 @@
|
||||
from typing import Any, IO, Sequence, Tuple, Union
|
||||
from typing import Any, IO, Sequence, Tuple, Union, List, Dict
|
||||
|
||||
__all__ = ... # type: list[str]
|
||||
__all__ = ... # type: List[str]
|
||||
DEFAULTSECT = ... # type: str
|
||||
MAX_INTERPOLATION_DEPTH = ... # type: int
|
||||
|
||||
@@ -42,7 +42,7 @@ class InterpolationDepthError(InterpolationError):
|
||||
|
||||
class ParsingError(Error):
|
||||
filename = ... # type: str
|
||||
errors = ... # type: list[Tuple[Any, Any]]
|
||||
errors = ... # type: List[Tuple[Any, Any]]
|
||||
def __init__(self, filename: str) -> None: ...
|
||||
def append(self, lineno: Any, line: Any) -> None: ...
|
||||
|
||||
@@ -60,20 +60,20 @@ class RawConfigParser:
|
||||
SECTCRE = ... # type: Any
|
||||
OPTCRE = ... # type: Any
|
||||
OPTCRE_NV = ... # type: Any
|
||||
def __init__(self, defaults: dict[Any, Any] = ..., dict_type: Any = ..., allow_no_value: bool = ...) -> None: ...
|
||||
def defaults(self) -> dict[Any, Any]: ...
|
||||
def sections(self) -> list[str]: ...
|
||||
def __init__(self, defaults: Dict[Any, Any] = ..., dict_type: Any = ..., allow_no_value: bool = ...) -> None: ...
|
||||
def defaults(self) -> Dict[Any, Any]: ...
|
||||
def sections(self) -> List[str]: ...
|
||||
def add_section(self, section: str) -> None: ...
|
||||
def has_section(self, section: str) -> bool: ...
|
||||
def options(self, section: str) -> list[str]: ...
|
||||
def read(self, filenames: Union[str, Sequence[str]]) -> list[str]: ...
|
||||
def options(self, section: str) -> List[str]: ...
|
||||
def read(self, filenames: Union[str, Sequence[str]]) -> List[str]: ...
|
||||
def readfp(self, fp: IO[str], filename: str = ...) -> None: ...
|
||||
def get(self, section: str, option: str) -> str: ...
|
||||
def items(self, section: str) -> list[Tuple[Any, Any]]: ...
|
||||
def items(self, section: str) -> List[Tuple[Any, Any]]: ...
|
||||
def _get(self, section: str, conv: type, option: str) -> Any: ...
|
||||
def getint(self, section: str, option: str) -> int: ...
|
||||
def getfloat(self, section: str, option: str) -> float: ...
|
||||
_boolean_states = ... # type: dict[str, bool]
|
||||
_boolean_states = ... # type: Dict[str, bool]
|
||||
def getboolean(self, section: str, option: str) -> bool: ...
|
||||
def optionxform(self, optionstr: str) -> str: ...
|
||||
def has_option(self, section: str, option: str) -> bool: ...
|
||||
@@ -86,7 +86,7 @@ class RawConfigParser:
|
||||
class ConfigParser(RawConfigParser):
|
||||
_KEYCRE = ... # type: Any
|
||||
def get(self, section: str, option: str, raw: bool = ..., vars: dict = ...) -> Any: ...
|
||||
def items(self, section: str, raw: bool = ..., vars: dict = ...) -> list[Tuple[str, Any]]: ...
|
||||
def items(self, section: str, raw: bool = ..., vars: dict = ...) -> List[Tuple[str, Any]]: ...
|
||||
def _interpolate(self, section: str, option: str, rawval: Any, vars: Any) -> str: ...
|
||||
def _interpolation_replace(self, match: Any) -> str: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user