mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-25 11:07:17 +08:00
Fixing flake8 E401, E402 errors
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
from typing import Any
|
||||
from . import packages
|
||||
from http.client import HTTPConnection as _HTTPConnection
|
||||
import ssl
|
||||
# from httplib import HTTPConnection as _HTTPConnection # python 2
|
||||
from . import exceptions
|
||||
from .packages import ssl_match_hostname
|
||||
@@ -12,7 +13,6 @@ import http.client
|
||||
|
||||
class DummyConnection: ...
|
||||
|
||||
import ssl
|
||||
BaseSSLError = ssl.SSLError
|
||||
ConnectionError = __builtins__.ConnectionError
|
||||
HTTPException = http.client.HTTPException
|
||||
|
||||
16
third_party/3/six/__init__.pyi
vendored
16
third_party/3/six/__init__.pyi
vendored
@@ -19,10 +19,14 @@ from typing import (
|
||||
ValuesView,
|
||||
overload,
|
||||
)
|
||||
import typing
|
||||
|
||||
import unittest
|
||||
import types
|
||||
import typing
|
||||
import unittest
|
||||
|
||||
# Exports
|
||||
from io import StringIO as StringIO, BytesIO as BytesIO
|
||||
from builtins import next as next
|
||||
from functools import wraps as wraps
|
||||
|
||||
_T = TypeVar('_T')
|
||||
_K = TypeVar('_K')
|
||||
@@ -45,9 +49,6 @@ MAXSIZE = ... # type: int
|
||||
# def add_move
|
||||
# def remove_move
|
||||
|
||||
from builtins import next as advance_iterator
|
||||
next = advance_iterator
|
||||
|
||||
def callable(obj: object) -> bool: ...
|
||||
|
||||
def get_unbound_function(unbound: types.FunctionType) -> types.FunctionType: ...
|
||||
@@ -80,7 +81,6 @@ def int2byte(i: int) -> bytes: ...
|
||||
def byte2int(bs: binary_type) -> int: ...
|
||||
def indexbytes(buf: binary_type, i: int) -> int: ...
|
||||
def iterbytes(buf: binary_type) -> typing.Iterator[int]: ...
|
||||
from io import StringIO as StringIO, BytesIO as BytesIO
|
||||
|
||||
def assertCountEqual(self: unittest.TestCase, first: Iterable[_T], second: Iterable[_T], msg: str = None) -> None: ...
|
||||
@overload
|
||||
@@ -96,8 +96,6 @@ def raise_from(value: BaseException, from_value: BaseException) -> None: ...
|
||||
|
||||
print_ = print
|
||||
|
||||
from functools import wraps as wraps
|
||||
|
||||
def with_metaclass(meta: type, *bases: type) -> type: ...
|
||||
def add_metaclass(metaclass: type) -> Callable[[_T], _T]: ...
|
||||
def python_2_unicode_compatible(klass: _T) -> _T: ...
|
||||
|
||||
Reference in New Issue
Block a user