mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
Fixing flake8 E202, E203, E225 errors
This commit is contained in:
3
.flake8
3
.flake8
@@ -18,11 +18,9 @@ ignore = F401, F811, E127, E128, E301, E302, E305, E501, E701, E704
|
||||
|
||||
# Errors that we need to fix before enabling flake8 by default:
|
||||
# 921 F821 undefined name
|
||||
# 48 E225 missing whitespace around operator
|
||||
# 28 E116 unexpected indentation (comment)
|
||||
# 26 F403 from * import used
|
||||
# 14 E251 unexpected spaces around keyword argument '='
|
||||
# 14 E203 whitespace before
|
||||
# 8 B006 mutable argument defaults
|
||||
# 7 E999 invalid syntax
|
||||
# 7 E111 indentation is not a multiple of four
|
||||
@@ -31,4 +29,3 @@ ignore = F401, F811, E127, E128, E301, E302, E305, E501, E701, E704
|
||||
# 4 E114 indentation is not a multiple of four
|
||||
# 3 E303 too many blank lines
|
||||
# 2 B303 __metaclass__ use on Python 3
|
||||
# 1 E202 whitespace before )
|
||||
|
||||
@@ -80,7 +80,7 @@ Traceback = NamedTuple(
|
||||
_FrameRecord = Tuple[FrameType, str, int, str, List[str], int]
|
||||
|
||||
def getouterframes(frame: FrameType, context: int = ...) -> List[FrameType]: ...
|
||||
def getframeinfo(frame: Union[FrameType, TracebackType] , context: int = ...) -> Traceback: ...
|
||||
def getframeinfo(frame: Union[FrameType, TracebackType], context: int = ...) -> Traceback: ...
|
||||
def getinnerframes(traceback: TracebackType, context: int = ...) -> List[FrameType]: ...
|
||||
|
||||
def currentframe() -> FrameType: ...
|
||||
|
||||
@@ -7,50 +7,50 @@ environ = ... # type: Dict[str, str]
|
||||
pathconf_names = ... # type: Dict[str, int]
|
||||
sysconf_names = ... # type: Dict[str, int]
|
||||
|
||||
EX_CANTCREAT= ... # type: int
|
||||
EX_CONFIG= ... # type: int
|
||||
EX_DATAERR= ... # type: int
|
||||
EX_IOERR= ... # type: int
|
||||
EX_NOHOST= ... # type: int
|
||||
EX_NOINPUT= ... # type: int
|
||||
EX_NOPERM= ... # type: int
|
||||
EX_NOUSER= ... # type: int
|
||||
EX_OK= ... # type: int
|
||||
EX_OSERR= ... # type: int
|
||||
EX_OSFILE= ... # type: int
|
||||
EX_PROTOCOL= ... # type: int
|
||||
EX_SOFTWARE= ... # type: int
|
||||
EX_TEMPFAIL= ... # type: int
|
||||
EX_UNAVAILABLE= ... # type: int
|
||||
EX_USAGE= ... # type: int
|
||||
F_OK= ... # type: int
|
||||
NGROUPS_MAX= ... # type: int
|
||||
O_APPEND= ... # type: int
|
||||
O_ASYNC= ... # type: int
|
||||
O_CREAT= ... # type: int
|
||||
O_DIRECT= ... # type: int
|
||||
O_DIRECTORY= ... # type: int
|
||||
O_DSYNC= ... # type: int
|
||||
O_EXCL= ... # type: int
|
||||
O_LARGEFILE= ... # type: int
|
||||
O_NDELAY= ... # type: int
|
||||
O_NOATIME= ... # type: int
|
||||
O_NOCTTY= ... # type: int
|
||||
O_NOFOLLOW= ... # type: int
|
||||
O_NONBLOCK= ... # type: int
|
||||
O_RDONLY= ... # type: int
|
||||
O_RDWR= ... # type: int
|
||||
O_RSYNC= ... # type: int
|
||||
O_SYNC= ... # type: int
|
||||
O_TRUNC= ... # type: int
|
||||
O_WRONLY= ... # type: int
|
||||
R_OK= ... # type: int
|
||||
TMP_MAX= ... # type: int
|
||||
WCONTINUED= ... # type: int
|
||||
WNOHANG= ... # type: int
|
||||
WUNTRACED= ... # type: int
|
||||
W_OK= ... # type: int
|
||||
X_OK= ... # type: int
|
||||
EX_CANTCREAT = ... # type: int
|
||||
EX_CONFIG = ... # type: int
|
||||
EX_DATAERR = ... # type: int
|
||||
EX_IOERR = ... # type: int
|
||||
EX_NOHOST = ... # type: int
|
||||
EX_NOINPUT = ... # type: int
|
||||
EX_NOPERM = ... # type: int
|
||||
EX_NOUSER = ... # type: int
|
||||
EX_OK = ... # type: int
|
||||
EX_OSERR = ... # type: int
|
||||
EX_OSFILE = ... # type: int
|
||||
EX_PROTOCOL = ... # type: int
|
||||
EX_SOFTWARE = ... # type: int
|
||||
EX_TEMPFAIL = ... # type: int
|
||||
EX_UNAVAILABLE = ... # type: int
|
||||
EX_USAGE = ... # type: int
|
||||
F_OK = ... # type: int
|
||||
NGROUPS_MAX = ... # type: int
|
||||
O_APPEND = ... # type: int
|
||||
O_ASYNC = ... # type: int
|
||||
O_CREAT = ... # type: int
|
||||
O_DIRECT = ... # type: int
|
||||
O_DIRECTORY = ... # type: int
|
||||
O_DSYNC = ... # type: int
|
||||
O_EXCL = ... # type: int
|
||||
O_LARGEFILE = ... # type: int
|
||||
O_NDELAY = ... # type: int
|
||||
O_NOATIME = ... # type: int
|
||||
O_NOCTTY = ... # type: int
|
||||
O_NOFOLLOW = ... # type: int
|
||||
O_NONBLOCK = ... # type: int
|
||||
O_RDONLY = ... # type: int
|
||||
O_RDWR = ... # type: int
|
||||
O_RSYNC = ... # type: int
|
||||
O_SYNC = ... # type: int
|
||||
O_TRUNC = ... # type: int
|
||||
O_WRONLY = ... # type: int
|
||||
R_OK = ... # type: int
|
||||
TMP_MAX = ... # type: int
|
||||
WCONTINUED = ... # type: int
|
||||
WNOHANG = ... # type: int
|
||||
WUNTRACED = ... # type: int
|
||||
W_OK = ... # type: int
|
||||
X_OK = ... # type: int
|
||||
|
||||
def WCOREDUMP(status: int) -> bool: ...
|
||||
def WEXITSTATUS(status: int) -> bool: ...
|
||||
|
||||
@@ -14,7 +14,7 @@ RLIMIT_STACK = ... # type: int
|
||||
RLIMIT_RSS = ... # type: int
|
||||
RLIMIT_NPROC = ... # type: int
|
||||
RLIMIT_NOFILE = ... # type: int
|
||||
RLIMIT_OFILE= ... # type: int
|
||||
RLIMIT_OFILE = ... # type: int
|
||||
RLIMIT_MEMLOCK = ... # type: int
|
||||
RLIMIT_VMEM = ... # type: int
|
||||
RLIMIT_AS = ... # type: int
|
||||
|
||||
@@ -67,7 +67,7 @@ version = ... # type: str
|
||||
def adapt(obj, protocol, alternate): ...
|
||||
def complete_statement(sql: str) -> bool: ...
|
||||
def connect(database: Union[bytes, unicode],
|
||||
timeout: float = ... ,
|
||||
timeout: float = ...,
|
||||
detect_types: int = ...,
|
||||
isolation_level: Union[str, None] = ...,
|
||||
check_same_thread: bool = ...,
|
||||
|
||||
@@ -59,8 +59,8 @@ class CodeType:
|
||||
co_lnotab = ... # type: str
|
||||
co_name = ... # type: str
|
||||
co_names = ... # type: Tuple[str, ...]
|
||||
co_nlocals= ... # type: int
|
||||
co_stacksize= ... # type: int
|
||||
co_nlocals = ... # type: int
|
||||
co_stacksize = ... # type: int
|
||||
co_varnames = ... # type: Tuple[str, ...]
|
||||
|
||||
class GeneratorType:
|
||||
|
||||
@@ -16,7 +16,7 @@ class Request(object):
|
||||
headers = ... # type: Dict[str, str]
|
||||
unverifiable = ... # type: bool
|
||||
type = ...
|
||||
origin_req_host= ...
|
||||
origin_req_host = ...
|
||||
unredirected_hdrs = ...
|
||||
|
||||
def __init__(self, url: str, data: str = None, headers: Dict[str, str] = ...,
|
||||
|
||||
@@ -59,7 +59,7 @@ def S_ISBLK(mode: int) -> bool: ...
|
||||
def S_ISCHR(mode: int) -> bool: ...
|
||||
def S_ISDIR(mode: int) -> bool: ...
|
||||
def S_ISDOOR(mode: int) -> bool: ...
|
||||
def S_ISFIFO(mode: int ) -> bool: ...
|
||||
def S_ISFIFO(mode: int) -> bool: ...
|
||||
def S_ISLNK(mode: int) -> bool: ...
|
||||
def S_ISPORT(mode: int) -> bool: ...
|
||||
def S_ISREG(mode: int) -> bool: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from typing import List, Union, Iterator, Tuple, Optional, Any, IO, NamedTuple
|
||||
|
||||
from opcode import (hasconst, hasname, hasjrel, hasjabs, haslocal, hascompare,
|
||||
hasfree, hasnargs, cmp_op, opname , opmap , HAVE_ARGUMENT,
|
||||
hasfree, hasnargs, cmp_op, opname, opmap, HAVE_ARGUMENT,
|
||||
EXTENDED_ARG, stack_effect)
|
||||
|
||||
import types
|
||||
|
||||
@@ -24,7 +24,7 @@ def find(domain: str, localedir: str = ..., languages: List[str] = ...,
|
||||
|
||||
def translation(domain: str, localedir: str = ..., languages: List[str] = ...,
|
||||
class_: Callable[[IO[str]], NullTranslations] = ...,
|
||||
fallback: bool =... , codeset: Any = ...) -> NullTranslations: ...
|
||||
fallback: bool =..., codeset: Any = ...) -> NullTranslations: ...
|
||||
|
||||
def install(domain: str, localedir: str = ..., codeset: Any = ...,
|
||||
names: List[str] = ...): ...
|
||||
|
||||
@@ -67,7 +67,7 @@ version = ... # type: str
|
||||
def adapt(obj, protocol, alternate): ...
|
||||
def complete_statement(sql: str) -> bool: ...
|
||||
def connect(database: Union[bytes, AnyStr],
|
||||
timeout: float = ... ,
|
||||
timeout: float = ...,
|
||||
detect_types: int = ...,
|
||||
isolation_level: Union[str, None] = ...,
|
||||
check_same_thread: bool = ...,
|
||||
|
||||
Reference in New Issue
Block a user