mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-20 19:01:15 +08:00
Fixing flake8 W errors
This commit is contained in:
@@ -37,4 +37,3 @@ def literal_eval(node_or_string: Union[str, AST]) -> Any: ...
|
||||
def walk(node: AST) -> Iterator[AST]: ...
|
||||
|
||||
PyCF_ONLY_AST = ... # type: int
|
||||
|
||||
|
||||
@@ -12,4 +12,3 @@ class ProcessPoolExecutor(Executor):
|
||||
def submit(self, fn: Callable[..., _T], *args: Any, **kwargs: Any) -> Future[_T]: ...
|
||||
def map(self, func: Callable[..., _T], *iterables: Any, timeout: Optional[float] = ..., chunksize: int = ...) -> Iterable[_T]: ...
|
||||
def shutdown(self, wait: bool = ...) -> None: ...
|
||||
|
||||
|
||||
@@ -8,4 +8,3 @@ class ThreadPoolExecutor(Executor):
|
||||
def submit(self, fn: Callable[..., _T], *args: Any, **kwargs: Any) -> Future[_T]: ...
|
||||
def map(self, func: Callable[..., _T], *iterables: Any, timeout: Optional[float] = ..., chunksize: int = ...) -> Iterable[_T]: ...
|
||||
def shutdown(self, wait: bool = ...) -> None: ...
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ Instruction = NamedTuple("Instruction", [
|
||||
])
|
||||
|
||||
|
||||
# if sys.version_info >= (3, 4):
|
||||
# if sys.version_info >= (3, 4):
|
||||
class Bytecode:
|
||||
codeobj = ... # type: types.CodeType
|
||||
first_line = ... # type: int
|
||||
@@ -36,7 +36,7 @@ class Bytecode:
|
||||
@classmethod
|
||||
def from_traceback(cls, tb: types.TracebackType) -> Bytecode: ...
|
||||
|
||||
|
||||
|
||||
COMPILER_FLAG_NAMES = ... # type: Dict[int, str]
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ def findlinestarts(code: _have_code) -> Iterator[Tuple[int, int]]: ...
|
||||
|
||||
# if sys.version_info >= (3, 2):
|
||||
def code_info(x: _have_code_or_string) -> str: ...
|
||||
|
||||
|
||||
# `file` parameter requires sys.version_info >= (3, 4):
|
||||
def dis(x: _have_code_or_string = ..., *, file = ...) -> None: ...
|
||||
def distb(tb: types.TracebackType = ..., *, file: IO[str] = ...) -> None: ...
|
||||
|
||||
@@ -59,4 +59,3 @@ if sys.version_info >= (3, 2):
|
||||
strict: Optional[bool]) -> None: ...
|
||||
def parse(self, fp: BinaryIO, headersonly: bool = ...) -> Message: ...
|
||||
def parsestr(self, text: str, headersonly: bool = ...) -> Message: ...
|
||||
|
||||
|
||||
@@ -4,4 +4,3 @@
|
||||
|
||||
import typing
|
||||
from os import stat_result
|
||||
|
||||
|
||||
@@ -20,25 +20,25 @@ if sys.version_info >= (3, 5):
|
||||
|
||||
# Nearly same args as Popen.__init__ except for timeout, input, and check
|
||||
def run(args: Union[str, Sequence[str]],
|
||||
timeout: float = ...,
|
||||
input: Union[str, bytes] = ...,
|
||||
check: bool = ...,
|
||||
bufsize: int = ...,
|
||||
executable: str = ...,
|
||||
stdin: Any = ...,
|
||||
stdout: Any = ...,
|
||||
stderr: Any = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: str = ...,
|
||||
env: Mapping[str, str] = ...,
|
||||
universal_newlines: bool = ...,
|
||||
startupinfo: Any = ...,
|
||||
creationflags: int = ...,
|
||||
restore_signals: bool = ...,
|
||||
start_new_session: bool = ...,
|
||||
pass_fds: Any = ...) -> CompletedProcess: ...
|
||||
timeout: float = ...,
|
||||
input: Union[str, bytes] = ...,
|
||||
check: bool = ...,
|
||||
bufsize: int = ...,
|
||||
executable: str = ...,
|
||||
stdin: Any = ...,
|
||||
stdout: Any = ...,
|
||||
stderr: Any = ...,
|
||||
preexec_fn: Callable[[], Any] = ...,
|
||||
close_fds: bool = ...,
|
||||
shell: bool = ...,
|
||||
cwd: str = ...,
|
||||
env: Mapping[str, str] = ...,
|
||||
universal_newlines: bool = ...,
|
||||
startupinfo: Any = ...,
|
||||
creationflags: int = ...,
|
||||
restore_signals: bool = ...,
|
||||
start_new_session: bool = ...,
|
||||
pass_fds: Any = ...) -> CompletedProcess: ...
|
||||
|
||||
# Same args as Popen.__init__
|
||||
if sys.version_info >= (3, 3):
|
||||
|
||||
@@ -447,4 +447,3 @@ def NamedTuple(typename: str, fields: Iterable[Tuple[str, Any]], *,
|
||||
verbose: bool = ..., rename: bool = ..., module: str = None) -> Type[tuple]: ...
|
||||
|
||||
def NewType(name: str, tp: Type[_T]) -> Type[_T]: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user