diff --git a/stdlib/2.7/socket.pyi b/stdlib/2.7/socket.pyi index e12e35c6a..d99a1279a 100644 --- a/stdlib/2.7/socket.pyi +++ b/stdlib/2.7/socket.pyi @@ -22,7 +22,7 @@ SOCK_CLOEXEC = 0 SOCK_NONBLOCK = 0 SOMAXCONN = 0 has_ipv6 = False -_GLOBAL_DEFAULT_TIMEOUT = 0.0 +_GLOBAL_DEFAULT_TIMEOUT = ... # type: Any SocketType = ... # type: Any SocketIO = ... # type: Any diff --git a/stdlib/2.7/sqlite3/dbapi2.pyi b/stdlib/2.7/sqlite3/dbapi2.pyi index 42a7f3045..5ef3a3c23 100644 --- a/stdlib/2.7/sqlite3/dbapi2.pyi +++ b/stdlib/2.7/sqlite3/dbapi2.pyi @@ -106,7 +106,7 @@ class Connection: def create_aggregate(self, name: str, num_params: int, aggregate_class: type) -> None: ... def create_collation(self, name: str, callable: Any) -> None: ... def create_function(self, name: str, num_params: int, func: Any) -> None: ... - def cursor(self, cursorClass= Union[type, None]) -> Cursor: ... + def cursor(self, cursorClass=...) -> Cursor: ... def execute(self, sql: str, parameters: Iterable = ...) -> Cursor: ... # TODO: please check in executemany() if seq_of_parameters type is possible like this def executemany(self, sql: str, seq_of_parameters: Iterable[Iterable]) -> Cursor: ... diff --git a/stdlib/2.7/threading.pyi b/stdlib/2.7/threading.pyi index 3c0c78c99..cf8ead91c 100644 --- a/stdlib/2.7/threading.pyi +++ b/stdlib/2.7/threading.pyi @@ -11,8 +11,8 @@ def enumerate() -> List[Thread]: ... class Thread(object): name = ... # type: str - ident = 0 - daemon = False + ident = ... # type: Optional[int] + daemon = ... # type: bool def __init__(self, group: Any = ..., target: Callable[..., Any] = ..., name: str = ..., args: Sequence[Any] = ..., diff --git a/stdlib/2.7/urllib2.pyi b/stdlib/2.7/urllib2.pyi index fba73a0cf..292bc2119 100644 --- a/stdlib/2.7/urllib2.pyi +++ b/stdlib/2.7/urllib2.pyi @@ -61,8 +61,10 @@ class HTTPRedirectHandler(BaseHandler): max_repeats = ... # int max_redirections = ... # int def redirect_request(self, req, fp, code, msg, headers, newurl): ... + def http_error_301(self, req, fp, code, msg, headers): ... def http_error_302(self, req, fp, code, msg, headers): ... - http_error_301 = http_error_303 = http_error_307 = http_error_302 + def http_error_303(self, req, fp, code, msg, headers): ... + def http_error_307(self, req, fp, code, msg, headers): ... inf_msg = ... # type: str @@ -120,12 +122,12 @@ class AbstractHTTPHandler(BaseHandler): class HTTPHandler(AbstractHTTPHandler): def http_open(self, req): ... - http_request = AbstractHTTPHandler.do_request_ + def http_request(self, request): ... class HTTPSHandler(AbstractHTTPHandler): def __init__(self, debuglevel=0, context=None): ... def https_open(self, req): ... - https_request = AbstractHTTPHandler.do_request_ + def https_request(self, request): ... class HTTPCookieProcessor(BaseHandler): def __init__(self, cookiejar=None): ... diff --git a/tests/pytype_blacklist.txt b/tests/pytype_blacklist.txt index a3e1bc4c8..7667e3952 100644 --- a/tests/pytype_blacklist.txt +++ b/tests/pytype_blacklist.txt @@ -11,15 +11,11 @@ 2.7/os/__init__.pyi 2.7/resource.pyi 2.7/simplejson/__init__.pyi -2.7/socket.pyi -2.7/sqlite3/dbapi2.pyi 2.7/ssl.pyi -2.7/threading.pyi 2.7/time.pyi 2.7/types.pyi 2.7/typing.pyi 2.7/unittest.pyi -2.7/urllib2.pyi 2.7/urlparse.pyi 2.7/uuid.pyi 2.7/xml/etree/ElementInclude.pyi