mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Fixing flake8 W errors
This commit is contained in:
@@ -28,4 +28,4 @@ class HTMLParser(ParserBase):
|
||||
class HTMLParseError(Exception):
|
||||
msg = ... # type: str
|
||||
lineno = ... # type: int
|
||||
offset = ... # type: int
|
||||
offset = ... # type: int
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import collections
|
||||
|
||||
class UserString(collections.Sequence): ...
|
||||
class MutableString(UserString, collections.MutableSequence): ...
|
||||
class MutableString(UserString, collections.MutableSequence): ...
|
||||
|
||||
@@ -29,8 +29,8 @@ class SRE_Scanner(object):
|
||||
|
||||
class SRE_Pattern(object):
|
||||
pattern = ... # type: str
|
||||
flags = ... # type: int
|
||||
groups = ... # type: int
|
||||
flags = ... # type: int
|
||||
groups = ... # type: int
|
||||
groupindex = ... # type: Mapping[int, int]
|
||||
indexgroup = ... # type: Sequence[int]
|
||||
def findall(self, source: str, pos:int = ..., endpos:int = ...) -> List[Union[tuple, str]]: ...
|
||||
|
||||
@@ -37,5 +37,3 @@ class symtable(object):
|
||||
varnames = ... # type: List[str]
|
||||
|
||||
def __init__(self, src: str, filename: str, startstr: str) -> None: ...
|
||||
|
||||
|
||||
|
||||
@@ -38,6 +38,3 @@ class NodeVisitor():
|
||||
|
||||
class NodeTransformer(NodeVisitor):
|
||||
def generic_visit(self, node: AST) -> None: ...
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@ DecimalTuple = NamedTuple('DecimalTuple',
|
||||
('exponent', int)])
|
||||
|
||||
ROUND_DOWN = ... # type: str
|
||||
ROUND_HALF_UP = ... # type: str
|
||||
ROUND_HALF_UP = ... # type: str
|
||||
ROUND_HALF_EVEN = ... # type: str
|
||||
ROUND_CEILING = ... # type: str
|
||||
ROUND_CEILING = ... # type: str
|
||||
ROUND_FLOOR = ... # type: str
|
||||
ROUND_UP = ... # type: str
|
||||
ROUND_HALF_DOWN = ... # type: str
|
||||
@@ -155,16 +155,16 @@ class Decimal(SupportsAbs[Decimal], SupportsFloat, SupportsInt):
|
||||
def __format__(self, specifier, context=None, _localeconv=None) -> str: ...
|
||||
|
||||
class _ContextManager:
|
||||
new_context = ... # type: Context
|
||||
new_context = ... # type: Context
|
||||
saved_context = ... # type: Context
|
||||
def __init__(self, new_context: Context) -> None: ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, t, v, tb): ...
|
||||
|
||||
class Context:
|
||||
prec = ... # type: int
|
||||
rounding = ... # type: str
|
||||
Emin = ... # type: int
|
||||
prec = ... # type: int
|
||||
rounding = ... # type: str
|
||||
Emin = ... # type: int
|
||||
Emax = ... # type: int
|
||||
capitals = ... # type: int
|
||||
traps = ... # type: Dict[type, bool]
|
||||
|
||||
@@ -247,4 +247,3 @@ class Values:
|
||||
def ensure_value(self, attr, value) -> Any: ...
|
||||
def read_file(self, filename, *args, **kwargs) -> None: ...
|
||||
def read_module(self, modname, *args, **kwargs) -> None: ...
|
||||
|
||||
|
||||
@@ -203,4 +203,3 @@ def wait4(pid: int, options: int) -> Tuple[int, int, _r]: ...
|
||||
def waitpid(pid: int, options: int) -> int:
|
||||
raise OSError()
|
||||
def write(fd: int, str: str) -> int: ...
|
||||
|
||||
|
||||
@@ -15,4 +15,3 @@ class struct_passwd(tuple):
|
||||
def getpwall() -> List[struct_passwd]: ...
|
||||
def getpwnam(name:str) -> struct_passwd: ...
|
||||
def getpwuid(uid:int) -> struct_passwd: ...
|
||||
|
||||
|
||||
@@ -9,4 +9,3 @@ class sha(object):
|
||||
def new(string: str = ...) -> sha: ...
|
||||
blocksize = 0
|
||||
digest_size = 0
|
||||
|
||||
|
||||
@@ -70,4 +70,3 @@ def translate(s: str, table: str, deletechars: str = ...) -> str:
|
||||
|
||||
def upper(s: str) -> str:
|
||||
raise DeprecationWarning()
|
||||
|
||||
|
||||
@@ -358,4 +358,3 @@ def NamedTuple(typename: str, fields: Iterable[Tuple[str, Any]], *,
|
||||
verbose: bool = ..., rename: bool = ...) -> Type[tuple]: ...
|
||||
|
||||
def NewType(name: str, tp: Type[_T]) -> Type[_T]: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user