mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Use "..." for attribute values, instead of None, [], {}
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
from typing import Any, Tuple
|
||||
|
||||
__all__ = None # type: list[str]
|
||||
DEFAULTSECT = None # type: str
|
||||
MAX_INTERPOLATION_DEPTH = None # type: int
|
||||
__all__ = ... # type: list[str]
|
||||
DEFAULTSECT = ... # type: str
|
||||
MAX_INTERPOLATION_DEPTH = ... # type: int
|
||||
|
||||
class Error(Exception):
|
||||
message = None # type: Any
|
||||
message = ... # type: Any
|
||||
def __init__(self, msg: str = ...) -> None: ...
|
||||
def _get_message(self) -> None: ...
|
||||
def _set_message(self, value: str) -> None: ...
|
||||
def __repr__(self) -> str: ...
|
||||
__str__ = __repr__
|
||||
def __str__(self) -> str: ...
|
||||
|
||||
class NoSectionError(Error):
|
||||
section = ... # type: str
|
||||
|
||||
@@ -4,10 +4,10 @@ class _Feature:
|
||||
def getOptionalRelease(self) -> _version_info: ...
|
||||
def getMandatoryRelease(self) -> _version_info: ...
|
||||
|
||||
absolute_import = None # type: _Feature
|
||||
division = None # type: _Feature
|
||||
generators = None # type: _Feature
|
||||
nested_scopes = None # type: _Feature
|
||||
print_function = None # type: _Feature
|
||||
unicode_literals = None # type: _Feature
|
||||
with_statement = None # type: _Feature
|
||||
absolute_import = ... # type: _Feature
|
||||
division = ... # type: _Feature
|
||||
generators = ... # type: _Feature
|
||||
nested_scopes = ... # type: _Feature
|
||||
print_function = ... # type: _Feature
|
||||
unicode_literals = ... # type: _Feature
|
||||
with_statement = ... # type: _Feature
|
||||
|
||||
@@ -17,7 +17,7 @@ _KT = TypeVar('_KT')
|
||||
_VT = TypeVar('_VT')
|
||||
|
||||
# namedtuple is special-cased in the type checker; the initializer is ignored.
|
||||
namedtuple = object()
|
||||
namedtuple = ... # type: Any
|
||||
|
||||
class deque(Sized, Iterable[_T], Reversible[_T], Generic[_T]):
|
||||
def __init__(self, iterable: Iterable[_T] = ...,
|
||||
|
||||
@@ -55,7 +55,7 @@ OP = 0
|
||||
ERRORTOKEN = 0
|
||||
N_TOKENS = 0
|
||||
NT_OFFSET = 0
|
||||
tok_name = {} # type: Dict[int, str]
|
||||
tok_name = ... # type: Dict[int, str]
|
||||
|
||||
def ISTERMINAL(x) -> bool: ...
|
||||
def ISNONTERMINAL(x) -> bool: ...
|
||||
|
||||
@@ -264,12 +264,12 @@ class Match(Generic[AnyStr]):
|
||||
pos = 0
|
||||
endpos = 0
|
||||
lastindex = 0
|
||||
lastgroup = None # type: AnyStr
|
||||
string = None # type: AnyStr
|
||||
lastgroup = ... # type: AnyStr
|
||||
string = ... # type: AnyStr
|
||||
|
||||
# The regular expression object whose match() or search() method produced
|
||||
# this match instance.
|
||||
re = None # type: 'Pattern[AnyStr]'
|
||||
re = ... # type: 'Pattern[AnyStr]'
|
||||
|
||||
def expand(self, template: AnyStr) -> AnyStr: ...
|
||||
|
||||
@@ -294,7 +294,7 @@ class Pattern(Generic[AnyStr]):
|
||||
flags = 0
|
||||
groupindex = 0
|
||||
groups = 0
|
||||
pattern = None # type: AnyStr
|
||||
pattern = ... # type: AnyStr
|
||||
|
||||
def search(self, string: AnyStr, pos: int = ...,
|
||||
endpos: int = ...) -> Match[AnyStr]: ...
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
from typing import Dict, List, NamedTuple, Tuple, Sequence, Union, overload
|
||||
|
||||
uses_relative = [] # type: List[str]
|
||||
uses_netloc = [] # type: List[str]
|
||||
uses_params = [] # type: List[str]
|
||||
non_hierarchical = [] # type: List[str]
|
||||
uses_query = [] # type: List[str]
|
||||
uses_fragment = [] # type: List[str]
|
||||
uses_relative = ... # type: List[str]
|
||||
uses_netloc = ... # type: List[str]
|
||||
uses_params = ... # type: List[str]
|
||||
non_hierarchical = ... # type: List[str]
|
||||
uses_query = ... # type: List[str]
|
||||
uses_fragment = ... # type: List[str]
|
||||
scheme_chars = ... # type: str
|
||||
MAX_CACHE_SIZE = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user