diff --git a/.flake8 b/.flake8 index 11c9f01a9..383fc9988 100644 --- a/.flake8 +++ b/.flake8 @@ -18,7 +18,6 @@ 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 -# 59 E265 block comment should start with # # 52 E402 module-level import not at top of file # 48 E225 missing whitespace around operator # 28 E116 unexpected indentation (comment) diff --git a/stdlib/2/email/mime/base.pyi b/stdlib/2/email/mime/base.pyi index 82554dadd..0a3eb4cf9 100644 --- a/stdlib/2/email/mime/base.pyi +++ b/stdlib/2/email/mime/base.pyi @@ -5,6 +5,6 @@ # import message # TODO -#class MIMEBase(message.Message): +# class MIMEBase(message.Message): class MIMEBase: def __init__(self, _maintype, _subtype, **_params) -> None: ... diff --git a/stdlib/2/os/__init__.pyi b/stdlib/2/os/__init__.pyi index eebcfe987..2c0dcc768 100644 --- a/stdlib/2/os/__init__.pyi +++ b/stdlib/2/os/__init__.pyi @@ -272,8 +272,8 @@ O_LARGEFILE = 0 # Gnu extension if in C library P_NOWAIT = 0 P_NOWAITO = 0 P_WAIT = 0 -#P_DETACH = 0 # Windows only -#P_OVERLAY = 0 # Windows only +# P_DETACH = 0 # Windows only +# P_OVERLAY = 0 # Windows only # wait()/waitpid() options WNOHANG = 0 # Unix only diff --git a/stdlib/2/os/path.pyi b/stdlib/2/os/path.pyi index 99b29e5bd..bfd88a454 100644 --- a/stdlib/2/os/path.pyi +++ b/stdlib/2/os/path.pyi @@ -52,7 +52,7 @@ def relpath(path: AnyStr, start: AnyStr = ...) -> AnyStr: ... def samefile(path1: unicode, path2: unicode) -> bool: ... def sameopenfile(fp1: int, fp2: int) -> bool: ... # TODO -#def samestat(stat1: stat_result, +# def samestat(stat1: stat_result, # stat2: stat_result) -> bool: ... # Unix only def split(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... diff --git a/stdlib/2and3/bisect.pyi b/stdlib/2and3/bisect.pyi index 51ffc9b50..5c541124a 100644 --- a/stdlib/2and3/bisect.pyi +++ b/stdlib/2and3/bisect.pyi @@ -4,14 +4,14 @@ from typing import Any, Sequence, TypeVar _T = TypeVar('_T') -# TODO uncomment when mypy#2035 is fixed -#def bisect_left(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... -#def bisect_right(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... -#def bisect(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... +# TODO uncomment when mypy# 2035 is fixed +# def bisect_left(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... +# def bisect_right(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... +# def bisect(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... # -#def insort_left(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... -#def insort_right(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... -#def insort(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... +# def insort_left(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... +# def insort_right(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... +# def insort(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... def bisect_left(a: Sequence, x: Any, lo: int = ..., hi: int = ...) -> int: ... def bisect_right(a: Sequence, x: Any, lo: int = ..., hi: int = ...) -> int: ... diff --git a/stdlib/2and3/logging/config.pyi b/stdlib/2and3/logging/config.pyi index d4665d779..99f740659 100644 --- a/stdlib/2and3/logging/config.pyi +++ b/stdlib/2and3/logging/config.pyi @@ -3,7 +3,7 @@ from typing import Any, Callable, Dict, Optional, IO, Union import sys if sys.version_info >= (3,): - #from configparser import RawConfigParser + # from configparser import RawConfigParser # TODO add RawConfigParser to configparser stubs RawConfigParser = Any else: diff --git a/stdlib/3.4/asyncio/events.pyi b/stdlib/3.4/asyncio/events.pyi index 491cd1888..3d833d99f 100644 --- a/stdlib/3.4/asyncio/events.pyi +++ b/stdlib/3.4/asyncio/events.pyi @@ -30,7 +30,7 @@ class AbstractEventLoop(metaclass=ABCMeta): @abstractmethod def run_forever(self) -> None: ... - # Can't use a union, see mypy issue #1873. + # Can't use a union, see mypy issue # 1873. @overload @abstractmethod def run_until_complete(self, future: Generator[Any, Any, _T]) -> _T: ... @@ -94,28 +94,28 @@ class AbstractEventLoop(metaclass=ABCMeta): def create_datagram_endpoint(self, protocol_factory: Any, local_addr: str = ..., remote_addr: str = ..., *, family: int = ..., proto: int = ..., flags: int = ...) -> tuple: ... - #?? check Any + # ?? check Any # return (Transport, Protocol) # Pipes and subprocesses. @abstractmethod def connect_read_pipe(self, protocol_factory: Any, pipe: Any) -> tuple: ... - #?? check Any + # ?? check Any # return (Transport, Protocol) @abstractmethod def connect_write_pipe(self, protocol_factory: Any, pipe: Any) -> tuple: ... - #?? check Any + # ?? check Any # return (Transport, Protocol) @abstractmethod def subprocess_shell(self, protocol_factory: Any, cmd: Union[bytes, str], *, stdin: Any = ..., stdout: Any = ..., stderr: Any = ..., **kwargs: Any) -> tuple: ... - #?? check Any + # ?? check Any # return (Transport, Protocol) @abstractmethod def subprocess_exec(self, protocol_factory: Any, *args: List[Any], stdin: Any = ..., stdout: Any = ..., stderr: Any = ..., **kwargs: Any) -> tuple: ... - #?? check Any + # ?? check Any # return (Transport, Protocol) @abstractmethod def add_reader(self, fd: int, callback: Callable[[], Any], *args: List[Any]) -> None: ... @@ -127,11 +127,11 @@ class AbstractEventLoop(metaclass=ABCMeta): def remove_writer(self, fd: int) -> None: ... # Completion based I/O methods returning Futures. @abstractmethod - def sock_recv(self, sock: Any, nbytes: int) -> Any: ... #TODO + def sock_recv(self, sock: Any, nbytes: int) -> Any: ... # TODO @abstractmethod - def sock_sendall(self, sock: Any, data: bytes) -> None: ... #TODO + def sock_sendall(self, sock: Any, data: bytes) -> None: ... # TODO @abstractmethod - def sock_connect(self, sock: Any, address: str) -> Any: ... #TODO + def sock_connect(self, sock: Any, address: str) -> Any: ... # TODO @abstractmethod def sock_accept(self, sock: Any) -> Any: ... # Signal handling. diff --git a/stdlib/3/curses/__init__.pyi b/stdlib/3/curses/__init__.pyi index d7cb787fa..e60fdf30d 100644 --- a/stdlib/3/curses/__init__.pyi +++ b/stdlib/3/curses/__init__.pyi @@ -4,7 +4,7 @@ from _curses import * # Stubgen imports a python version of has_key only if it's not present -#in _curses (which it is in this stub) +# in _curses (which it is in this stub) # from .has_key import has_key as has_key def initscr(): ... diff --git a/stdlib/3/importlib/abc.pyi b/stdlib/3/importlib/abc.pyi index a20958fd8..75c335639 100644 --- a/stdlib/3/importlib/abc.pyi +++ b/stdlib/3/importlib/abc.pyi @@ -15,9 +15,9 @@ class Finder(metaclass=ABCMeta): ... # Technically this class defines the following method, but its subclasses # in this module violate its signature. Since this class is deprecated, it's # easier to simply ignore that this method exists. - #@abstractmethod - #def find_module(self, fullname: str, - # path: Sequence[_Path] = None) -> Optional[Loader]: ... + # @abstractmethod + # def find_module(self, fullname: str, + # path: Sequence[_Path] = None) -> Optional[Loader]: ... class ResourceLoader(Loader): @abstractmethod diff --git a/stdlib/3/io.pyi b/stdlib/3/io.pyi index 876f2fe6c..be70e5415 100644 --- a/stdlib/3/io.pyi +++ b/stdlib/3/io.pyi @@ -18,13 +18,13 @@ open = builtins.open # FIXME when mypy handle condtional, we can uncomment the next block and remove # the temporary fix -#if sys.version_info >= (3, 3): -# BlockingIOError = BlockingIOError -# class UnsupportedOperation(OSError, ValueError): ... -#else: -# class BlockingIOError(IOError): -# characters_written = ... # type: int -# class UnsupportedOperation(IOError, ValueError): ... +# if sys.version_info >= (3, 3): +# BlockingIOError = BlockingIOError +# class UnsupportedOperation(OSError, ValueError): ... +# else: +# class BlockingIOError(IOError): +# characters_written = ... # type: int +# class UnsupportedOperation(IOError, ValueError): ... class BlockingIOError(OSError): characters_written = ... # type: int class UnsupportedOperation(OSError, ValueError): ... @@ -190,12 +190,12 @@ class TextIOBase(IOBase): class TextIOWrapper(TextIO): line_buffering = ... # type: bool # TODO uncomment after fixing mypy about using write_through - #if sys.version_info >= (3, 3): + # if sys.version_info >= (3, 3): # def __init__(self, buffer: IO[bytes], encoding: str = ..., # errors: Optional[str] = ..., newline: Optional[str] = ..., # line_buffering: bool = ..., write_through: bool = ...) \ # -> None: ... - #else: + # else: # def __init__(self, buffer: IO[bytes], # encoding: str = ..., errors: Optional[str] = ..., # newline: Optional[str] = ..., line_buffering: bool = ...) \ diff --git a/stdlib/3/os/__init__.pyi b/stdlib/3/os/__init__.pyi index cc0353da6..0a42e5a56 100644 --- a/stdlib/3/os/__init__.pyi +++ b/stdlib/3/os/__init__.pyi @@ -94,13 +94,13 @@ EX_NOTFOUND = 0 # Unix only P_NOWAIT = 0 P_NOWAITO = 0 P_WAIT = 0 -#P_DETACH = 0 # Windows only -#P_OVERLAY = 0 # Windows only +# P_DETACH = 0 # Windows only +# P_OVERLAY = 0 # Windows only # wait()/waitpid() options WNOHANG = 0 # Unix only -#WCONTINUED = 0 # some Unix systems -#WUNTRACED = 0 # Unix only +# WCONTINUED = 0 # some Unix systems +# WUNTRACED = 0 # Unix only TMP_MAX = 0 # Undocumented, but used by tempfile diff --git a/stdlib/3/os/path.pyi b/stdlib/3/os/path.pyi index 32ba66e19..c695c5738 100644 --- a/stdlib/3/os/path.pyi +++ b/stdlib/3/os/path.pyi @@ -55,11 +55,11 @@ def relpath(path: AnyStr, start: AnyStr = ...) -> AnyStr: ... def samefile(path1: AnyStr, path2: AnyStr) -> bool: ... def sameopenfile(fp1: int, fp2: int) -> bool: ... -#def samestat(stat1: stat_result, +# def samestat(stat1: stat_result, # stat2: stat_result) -> bool: ... # Unix only def split(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... def splitdrive(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... def splitext(path: AnyStr) -> Tuple[AnyStr, AnyStr]: ... -#def splitunc(path: str) -> Tuple[str, str]: ... # Windows only, deprecated +# def splitunc(path: str) -> Tuple[str, str]: ... # Windows only, deprecated diff --git a/stdlib/3/posixpath.pyi b/stdlib/3/posixpath.pyi index 34b3e3640..7d8bb0948 100644 --- a/stdlib/3/posixpath.pyi +++ b/stdlib/3/posixpath.pyi @@ -38,9 +38,9 @@ def samefile(path1: str, path2: str) -> bool: ... def sameopenfile(fp1: IO[Any], fp2: IO[Any]) -> bool: ... -#def samestat(stat1: stat_result, stat2: stat_result) -> bool: +# def samestat(stat1: stat_result, stat2: stat_result) -> bool: # ... # Unix only def split(path: str) -> Tuple[str, str]: ... def splitdrive(path: str) -> Tuple[str, str]: ... def splitext(path: str) -> Tuple[str, str]: ... -#def splitunc(path: str) -> Tuple[str, str] : ... # Windows only, deprecated +# def splitunc(path: str) -> Tuple[str, str] : ... # Windows only, deprecated diff --git a/stdlib/3/sys.pyi b/stdlib/3/sys.pyi index 3b0fef391..37c7e7af8 100644 --- a/stdlib/3/sys.pyi +++ b/stdlib/3/sys.pyi @@ -17,7 +17,7 @@ argv = ... # type: List[str] byteorder = ... # type: str builtin_module_names = ... # type: Sequence[str] # actually a tuple of strings copyright = ... # type: str -#dllhandle = 0 # Windows only +# dllhandle = 0 # Windows only dont_write_bytecode = False __displayhook__ = ... # type: Any # contains the original value of displayhook __excepthook__ = ... # type: Any # contains the original value of excepthook @@ -53,7 +53,7 @@ api_version = 0 warnoptions = ... # type: Any # Each entry is a tuple of the form (action, message, category, module, # lineno) -#winver = '' # Windows only +# winver = '' # Windows only _xoptions = ... # type: Dict[Any, Any] flags = ... # type: _flags diff --git a/third_party/2/requests/packages/urllib3/filepost.pyi b/third_party/2/requests/packages/urllib3/filepost.pyi index c6fefa618..f1ce51735 100644 --- a/third_party/2/requests/packages/urllib3/filepost.pyi +++ b/third_party/2/requests/packages/urllib3/filepost.pyi @@ -4,11 +4,11 @@ from typing import Any from . import packages -#from .packages import six +# from .packages import six from . import fields -#six = packages.six -#b = six.b +# six = packages.six +# b = six.b RequestField = fields.RequestField writer = ... # type: Any diff --git a/third_party/2/requests/packages/urllib3/response.pyi b/third_party/2/requests/packages/urllib3/response.pyi index 1b2ec6981..9e310d242 100644 --- a/third_party/2/requests/packages/urllib3/response.pyi +++ b/third_party/2/requests/packages/urllib3/response.pyi @@ -6,7 +6,7 @@ from typing import Any, IO import io from . import _collections from . import exceptions -#from .packages import six +# from .packages import six from . import connection from .util import response diff --git a/third_party/2/requests/packages/urllib3/util/request.pyi b/third_party/2/requests/packages/urllib3/util/request.pyi index 20a6ea277..0be64df25 100644 --- a/third_party/2/requests/packages/urllib3/util/request.pyi +++ b/third_party/2/requests/packages/urllib3/util/request.pyi @@ -3,9 +3,9 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -#from ..packages import six +# from ..packages import six -#b = six.b +# b = six.b ACCEPT_ENCODING = ... # type: Any diff --git a/third_party/2/six/__init__.pyi b/third_party/2/six/__init__.pyi index f960eed10..1ee1f8bc9 100644 --- a/third_party/2/six/__init__.pyi +++ b/third_party/2/six/__init__.pyi @@ -29,8 +29,8 @@ binary_type = str MAXSIZE = ... # type: int -#def add_move -#def remove_move +# def add_move +# def remove_move def advance_iterator(it: typing.Iterator[_T]) -> _T: ... next = advance_iterator @@ -54,7 +54,7 @@ def get_function_globals(fun: types.FunctionType) -> Dict[str, Any]: ... def iterkeys(d: Mapping[_K, _V]) -> typing.Iterator[_K]: ... def itervalues(d: Mapping[_K, _V]) -> typing.Iterator[_V]: ... def iteritems(d: Mapping[_K, _V]) -> typing.Iterator[Tuple[_K, _V]]: ... -#def iterlists +# def iterlists def viewkeys(d: Mapping[_K, _V]) -> KeysView[_K]: ... def viewvalues(d: Mapping[_K, _V]) -> ValuesView[_V]: ... diff --git a/third_party/2/yaml/__init__.pyi b/third_party/2/yaml/__init__.pyi index 8a7eb8682..6efac209e 100644 --- a/third_party/2/yaml/__init__.pyi +++ b/third_party/2/yaml/__init__.pyi @@ -3,12 +3,12 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -#from yaml.error import * -#from yaml.tokens import * -#from yaml.events import * -#from yaml.nodes import * -#from yaml.loader import * -#from yaml.dumper import * +# from yaml.error import * +# from yaml.tokens import * +# from yaml.events import * +# from yaml.nodes import * +# from yaml.loader import * +# from yaml.dumper import * # TODO: stubs for cyaml? # from cyaml import * diff --git a/third_party/3/requests/cookies.pyi b/third_party/3/requests/cookies.pyi index 7b147d03e..f3bd57eed 100644 --- a/third_party/3/requests/cookies.pyi +++ b/third_party/3/requests/cookies.pyi @@ -1,12 +1,12 @@ # Stubs for requests.cookies (Python 3) from typing import Any, MutableMapping -#import cookielib +# import cookielib from http import cookiejar as cookielib import collections from . import compat -#cookielib = compat.cookielib +# cookielib = compat.cookielib class MockRequest: type = ... # type: Any diff --git a/third_party/3/requests/packages/urllib3/filepost.pyi b/third_party/3/requests/packages/urllib3/filepost.pyi index c6fefa618..f1ce51735 100644 --- a/third_party/3/requests/packages/urllib3/filepost.pyi +++ b/third_party/3/requests/packages/urllib3/filepost.pyi @@ -4,11 +4,11 @@ from typing import Any from . import packages -#from .packages import six +# from .packages import six from . import fields -#six = packages.six -#b = six.b +# six = packages.six +# b = six.b RequestField = fields.RequestField writer = ... # type: Any diff --git a/third_party/3/requests/packages/urllib3/response.pyi b/third_party/3/requests/packages/urllib3/response.pyi index 3c528d131..ba2a80164 100644 --- a/third_party/3/requests/packages/urllib3/response.pyi +++ b/third_party/3/requests/packages/urllib3/response.pyi @@ -6,7 +6,7 @@ from typing import Any import io from . import _collections from . import exceptions -#from .packages import six +# from .packages import six from .connection import HTTPException as HTTPException, BaseSSLError as BaseSSLError from .util import response diff --git a/third_party/3/requests/packages/urllib3/util/request.pyi b/third_party/3/requests/packages/urllib3/util/request.pyi index 20a6ea277..0be64df25 100644 --- a/third_party/3/requests/packages/urllib3/util/request.pyi +++ b/third_party/3/requests/packages/urllib3/util/request.pyi @@ -3,9 +3,9 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -#from ..packages import six +# from ..packages import six -#b = six.b +# b = six.b ACCEPT_ENCODING = ... # type: Any diff --git a/third_party/3/six/__init__.pyi b/third_party/3/six/__init__.pyi index e99c638c9..6768fc124 100644 --- a/third_party/3/six/__init__.pyi +++ b/third_party/3/six/__init__.pyi @@ -42,8 +42,8 @@ binary_type = bytes MAXSIZE = ... # type: int -#def add_move -#def remove_move +# def add_move +# def remove_move from builtins import next as advance_iterator next = advance_iterator @@ -66,7 +66,7 @@ def get_function_globals(fun: types.FunctionType) -> Dict[str, Any]: ... def iterkeys(d: Mapping[_K, _V]) -> typing.Iterator[_K]: ... def itervalues(d: Mapping[_K, _V]) -> typing.Iterator[_V]: ... def iteritems(d: Mapping[_K, _V]) -> typing.Iterator[Tuple[_K, _V]]: ... -#def iterlists +# def iterlists def viewkeys(d: Mapping[_K, _V]) -> KeysView[_K]: ... def viewvalues(d: Mapping[_K, _V]) -> ValuesView[_V]: ...