mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Upgrade to isort 5 (#4323)
This now also reformats imports not at the top of files.
This commit is contained in:
3
third_party/2and3/decorator.pyi
vendored
3
third_party/2and3/decorator.pyi
vendored
@@ -8,8 +8,7 @@ _T = TypeVar("_T")
|
||||
def get_init(cls): ...
|
||||
|
||||
if sys.version_info >= (3,):
|
||||
from inspect import iscoroutinefunction as iscoroutinefunction
|
||||
from inspect import getfullargspec as getfullargspec
|
||||
from inspect import getfullargspec as getfullargspec, iscoroutinefunction as iscoroutinefunction
|
||||
else:
|
||||
class FullArgSpec(NamedTuple):
|
||||
args: List[str]
|
||||
|
||||
2
third_party/2and3/jinja2/environment.pyi
vendored
2
third_party/2and3/jinja2/environment.pyi
vendored
@@ -6,7 +6,7 @@ from .loaders import BaseLoader
|
||||
from .runtime import Context, Undefined
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
from typing import Awaitable, AsyncIterator
|
||||
from typing import AsyncIterator, Awaitable
|
||||
|
||||
def get_spontaneous_environment(*args): ...
|
||||
def create_cache(size): ...
|
||||
|
||||
@@ -9,14 +9,12 @@ from .packages import ssl_match_hostname
|
||||
from .util import ssl_
|
||||
|
||||
if sys.version_info < (3, 0):
|
||||
from httplib import HTTPConnection as _HTTPConnection
|
||||
from httplib import HTTPException as HTTPException
|
||||
from httplib import HTTPConnection as _HTTPConnection, HTTPException as HTTPException
|
||||
class ConnectionError(Exception): ...
|
||||
|
||||
else:
|
||||
from http.client import HTTPConnection as _HTTPConnection
|
||||
from http.client import HTTPException as HTTPException
|
||||
from builtins import ConnectionError as ConnectionError
|
||||
from http.client import HTTPConnection as _HTTPConnection, HTTPException as HTTPException
|
||||
|
||||
class DummyConnection: ...
|
||||
|
||||
|
||||
12
third_party/2and3/typing_extensions.pyi
vendored
12
third_party/2and3/typing_extensions.pyi
vendored
@@ -70,11 +70,13 @@ if sys.version_info >= (3, 3):
|
||||
from typing import ChainMap as ChainMap
|
||||
|
||||
if sys.version_info >= (3, 5):
|
||||
from typing import AsyncIterable as AsyncIterable
|
||||
from typing import AsyncIterator as AsyncIterator
|
||||
from typing import AsyncContextManager as AsyncContextManager
|
||||
from typing import Awaitable as Awaitable
|
||||
from typing import Coroutine as Coroutine
|
||||
from typing import (
|
||||
AsyncContextManager as AsyncContextManager,
|
||||
AsyncIterable as AsyncIterable,
|
||||
AsyncIterator as AsyncIterator,
|
||||
Awaitable as Awaitable,
|
||||
Coroutine as Coroutine,
|
||||
)
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
from typing import AsyncGenerator as AsyncGenerator
|
||||
|
||||
4
third_party/2and3/werkzeug/serving.pyi
vendored
4
third_party/2and3/werkzeug/serving.pyi
vendored
@@ -2,11 +2,11 @@ import sys
|
||||
from typing import Any, Optional
|
||||
|
||||
if sys.version_info < (3,):
|
||||
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
|
||||
from SocketServer import ThreadingMixIn
|
||||
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
|
||||
else:
|
||||
from http.server import BaseHTTPRequestHandler, HTTPServer
|
||||
from socketserver import ThreadingMixIn
|
||||
from http.server import HTTPServer, BaseHTTPRequestHandler
|
||||
|
||||
if sys.platform == "win32":
|
||||
class ForkingMixIn(object): ...
|
||||
|
||||
4
third_party/2and3/werkzeug/test.pyi
vendored
4
third_party/2and3/werkzeug/test.pyi
vendored
@@ -4,11 +4,11 @@ from typing import Any, Generic, Optional, Text, Tuple, Type, TypeVar, overload
|
||||
from typing_extensions import Literal
|
||||
|
||||
if sys.version_info < (3,):
|
||||
from urllib2 import Request as U2Request
|
||||
from cookielib import CookieJar
|
||||
from urllib2 import Request as U2Request
|
||||
else:
|
||||
from urllib.request import Request as U2Request
|
||||
from http.cookiejar import CookieJar
|
||||
from urllib.request import Request as U2Request
|
||||
|
||||
def stream_encode_multipart(
|
||||
values, use_tempfile: int = ..., threshold=..., boundary: Optional[Any] = ..., charset: Text = ...
|
||||
|
||||
Reference in New Issue
Block a user