Fixing flake8 W errors

This commit is contained in:
Lukasz Langa
2016-12-19 21:52:56 -08:00
parent d2c0f83a72
commit b84f20a011
37 changed files with 35 additions and 72 deletions

View File

@@ -28,4 +28,4 @@ class HTMLParser(ParserBase):
class HTMLParseError(Exception):
msg = ... # type: str
lineno = ... # type: int
offset = ... # type: int
offset = ... # type: int

View File

@@ -1,4 +1,4 @@
import collections
class UserString(collections.Sequence): ...
class MutableString(UserString, collections.MutableSequence): ...
class MutableString(UserString, collections.MutableSequence): ...

View File

@@ -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]]: ...

View File

@@ -37,5 +37,3 @@ class symtable(object):
varnames = ... # type: List[str]
def __init__(self, src: str, filename: str, startstr: str) -> None: ...

View File

@@ -38,6 +38,3 @@ class NodeVisitor():
class NodeTransformer(NodeVisitor):
def generic_visit(self, node: AST) -> None: ...

View File

@@ -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]

View File

@@ -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: ...

View File

@@ -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: ...

View File

@@ -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: ...

View File

@@ -9,4 +9,3 @@ class sha(object):
def new(string: str = ...) -> sha: ...
blocksize = 0
digest_size = 0

View File

@@ -70,4 +70,3 @@ def translate(s: str, table: str, deletechars: str = ...) -> str:
def upper(s: str) -> str:
raise DeprecationWarning()

View File

@@ -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]: ...