mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-27 13:22:11 +08:00
adjust isort config (#4290)
Fixes #4288. - Default imports to THIRD_PARTY, so in effect we merge the FIRST_PARTY and THIRD_PARTY stubs. This means import order is no longer affected by whether typing_extensions is installed locally. - Treat typing_extensions, _typeshed and some others as standard library modules. Note that isort master is very different from the latest release; we'll have to do something different if and when the next isort release comes out.
This commit is contained in:
3
third_party/2/pathlib2.pyi
vendored
3
third_party/2/pathlib2.pyi
vendored
@@ -1,10 +1,9 @@
|
||||
import os
|
||||
import sys
|
||||
from _typeshed import OpenBinaryMode, OpenTextMode
|
||||
from types import TracebackType
|
||||
from typing import IO, Any, BinaryIO, Generator, List, Optional, Sequence, TextIO, Tuple, Type, TypeVar, Union, overload
|
||||
|
||||
from _typeshed import OpenBinaryMode, OpenTextMode
|
||||
|
||||
_P = TypeVar("_P", bound=PurePath)
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
|
||||
3
third_party/2and3/atomicwrites/__init__.pyi
vendored
3
third_party/2and3/atomicwrites/__init__.pyi
vendored
@@ -1,7 +1,6 @@
|
||||
import sys
|
||||
from typing import IO, Any, AnyStr, Callable, ContextManager, Generic, Optional, Text, Type, Union
|
||||
|
||||
from _typeshed import AnyPath
|
||||
from typing import IO, Any, AnyStr, Callable, ContextManager, Generic, Optional, Text, Type, Union
|
||||
|
||||
def replace_atomic(src: AnyStr, dst: AnyStr) -> None: ...
|
||||
def move_atomic(src: AnyStr, dst: AnyStr) -> None: ...
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import sys
|
||||
from logging import Logger
|
||||
from typing import Dict, Optional, Pattern
|
||||
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
class _FinalResultType(TypedDict):
|
||||
|
||||
1
third_party/2and3/dateutil/easter.pyi
vendored
1
third_party/2and3/dateutil/easter.pyi
vendored
@@ -1,5 +1,4 @@
|
||||
from datetime import date
|
||||
|
||||
from typing_extensions import Literal
|
||||
|
||||
EASTER_JULIAN: Literal[1]
|
||||
|
||||
1
third_party/2and3/flask/testing.pyi
vendored
1
third_party/2and3/flask/testing.pyi
vendored
@@ -6,7 +6,6 @@ from typing import IO, Any, Iterable, Mapping, Optional, Text, TypeVar, Union
|
||||
|
||||
from click import BaseCommand
|
||||
from click.testing import CliRunner, Result
|
||||
|
||||
from werkzeug.test import Client
|
||||
|
||||
def make_test_environ_builder(
|
||||
|
||||
3
third_party/2and3/jinja2/utils.pyi
vendored
3
third_party/2and3/jinja2/utils.pyi
vendored
@@ -1,8 +1,7 @@
|
||||
from _typeshed import AnyPath
|
||||
from typing import IO, Any, Callable, Iterable, Optional, Protocol, Text, TypeVar, Union
|
||||
|
||||
from typing_extensions import Literal
|
||||
|
||||
from _typeshed import AnyPath
|
||||
from markupsafe import Markup as Markup, escape as escape, soft_unicode as soft_unicode
|
||||
|
||||
missing: Any
|
||||
|
||||
3
third_party/2and3/toml.pyi
vendored
3
third_party/2and3/toml.pyi
vendored
@@ -1,8 +1,7 @@
|
||||
import datetime
|
||||
import sys
|
||||
from typing import IO, Any, List, Mapping, MutableMapping, Optional, Text, Type, Union
|
||||
|
||||
from _typeshed import StrPath, SupportsWrite
|
||||
from typing import IO, Any, List, Mapping, MutableMapping, Optional, Text, Type, Union
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
_PathLike = StrPath
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from typing import Any, Iterable, List, Mapping, Optional, Sequence, Set, Text
|
||||
|
||||
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
|
||||
from typing import Any, Iterable, List, Mapping, Optional, Sequence, Set, Text
|
||||
|
||||
from ..middleware.proxy_fix import ProxyFix as ProxyFix
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from typing import AnyStr, Generic, Tuple
|
||||
|
||||
from _typeshed import SupportsWrite
|
||||
from typing import AnyStr, Generic, Tuple
|
||||
|
||||
from ..middleware.profiler import *
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import collections
|
||||
from _typeshed import SupportsWrite
|
||||
from typing import (
|
||||
IO,
|
||||
Any,
|
||||
@@ -21,8 +22,6 @@ from typing import (
|
||||
overload,
|
||||
)
|
||||
|
||||
from _typeshed import SupportsWrite
|
||||
|
||||
_K = TypeVar("_K")
|
||||
_V = TypeVar("_V")
|
||||
_R = TypeVar("_R")
|
||||
|
||||
2
third_party/2and3/werkzeug/exceptions.pyi
vendored
2
third_party/2and3/werkzeug/exceptions.pyi
vendored
@@ -1,7 +1,7 @@
|
||||
import datetime
|
||||
from _typeshed.wsgi import StartResponse, WSGIEnvironment
|
||||
from typing import Any, Dict, Iterable, List, NoReturn, Optional, Protocol, Text, Tuple, Type, Union
|
||||
|
||||
from _typeshed.wsgi import StartResponse, WSGIEnvironment
|
||||
from werkzeug.wrappers import Response
|
||||
|
||||
class _EnvironContainer(Protocol):
|
||||
|
||||
3
third_party/2and3/werkzeug/formparser.pyi
vendored
3
third_party/2and3/werkzeug/formparser.pyi
vendored
@@ -1,3 +1,4 @@
|
||||
from _typeshed.wsgi import WSGIEnvironment
|
||||
from typing import (
|
||||
IO,
|
||||
Any,
|
||||
@@ -15,8 +16,6 @@ from typing import (
|
||||
Union,
|
||||
)
|
||||
|
||||
from _typeshed.wsgi import WSGIEnvironment
|
||||
|
||||
from .datastructures import Headers
|
||||
|
||||
_Dict = Any
|
||||
|
||||
3
third_party/2and3/werkzeug/http.pyi
vendored
3
third_party/2and3/werkzeug/http.pyi
vendored
@@ -1,4 +1,5 @@
|
||||
import sys
|
||||
from _typeshed.wsgi import WSGIEnvironment
|
||||
from datetime import datetime, timedelta
|
||||
from typing import (
|
||||
Any,
|
||||
@@ -17,8 +18,6 @@ from typing import (
|
||||
overload,
|
||||
)
|
||||
|
||||
from _typeshed.wsgi import WSGIEnvironment
|
||||
|
||||
from .datastructures import (
|
||||
Accept,
|
||||
Authorization,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from typing import Any, Iterable, Mapping, Optional, Text
|
||||
|
||||
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
|
||||
from typing import Any, Iterable, Mapping, Optional, Text
|
||||
|
||||
class DispatcherMiddleware(object):
|
||||
app: WSGIApplication
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from typing import Any, Dict, Iterable, Mapping, MutableMapping, Text
|
||||
|
||||
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
|
||||
from typing import Any, Dict, Iterable, Mapping, MutableMapping, Text
|
||||
|
||||
_Opts = Mapping[Text, Any]
|
||||
_MutableOpts = MutableMapping[Text, Any]
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import sys
|
||||
from typing import Any, Iterable, Iterator, List, Mapping, Optional, Protocol, Tuple
|
||||
|
||||
from _typeshed import SupportsWrite
|
||||
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
|
||||
from typing import Any, Iterable, Iterator, List, Mapping, Optional, Protocol, Tuple
|
||||
|
||||
from ..datastructures import Headers
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from typing import IO, Iterable, List, Optional, Text, Tuple, Union
|
||||
|
||||
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
|
||||
from typing import IO, Iterable, List, Optional, Text, Tuple, Union
|
||||
|
||||
class ProfilerMiddleware(object):
|
||||
def __init__(
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from typing import Iterable, Optional
|
||||
|
||||
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
|
||||
from typing import Iterable, Optional
|
||||
|
||||
class ProxyFix(object):
|
||||
app: WSGIApplication
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import datetime
|
||||
from typing import IO, Callable, Iterable, List, Mapping, Optional, Text, Tuple, Union
|
||||
|
||||
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
|
||||
from typing import IO, Callable, Iterable, List, Mapping, Optional, Text, Tuple, Union
|
||||
|
||||
_V = Union[Tuple[Text, Text], Text]
|
||||
|
||||
|
||||
6
third_party/2and3/werkzeug/test.pyi
vendored
6
third_party/2and3/werkzeug/test.pyi
vendored
@@ -1,9 +1,7 @@
|
||||
import sys
|
||||
from typing import Any, Generic, Optional, Text, Tuple, Type, TypeVar, overload
|
||||
|
||||
from typing_extensions import Literal
|
||||
|
||||
from _typeshed.wsgi import WSGIEnvironment
|
||||
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
|
||||
|
||||
4
third_party/2and3/werkzeug/wrappers.pyi
vendored
4
third_party/2and3/werkzeug/wrappers.pyi
vendored
@@ -1,4 +1,5 @@
|
||||
import sys
|
||||
from _typeshed.wsgi import InputStream, WSGIEnvironment
|
||||
from datetime import datetime
|
||||
from typing import (
|
||||
Any,
|
||||
@@ -16,11 +17,8 @@ from typing import (
|
||||
Union,
|
||||
overload,
|
||||
)
|
||||
|
||||
from typing_extensions import Literal
|
||||
|
||||
from _typeshed.wsgi import InputStream, WSGIEnvironment
|
||||
|
||||
from .datastructures import (
|
||||
Accept,
|
||||
Authorization,
|
||||
|
||||
3
third_party/2and3/werkzeug/wsgi.pyi
vendored
3
third_party/2and3/werkzeug/wsgi.pyi
vendored
@@ -1,7 +1,6 @@
|
||||
from typing import Any, Iterable, Optional, Text
|
||||
|
||||
from _typeshed import SupportsRead
|
||||
from _typeshed.wsgi import InputStream, WSGIEnvironment
|
||||
from typing import Any, Iterable, Optional, Text
|
||||
|
||||
from .middleware.dispatcher import DispatcherMiddleware as DispatcherMiddleware
|
||||
from .middleware.http_proxy import ProxyMiddleware as ProxyMiddleware
|
||||
|
||||
2
third_party/2and3/yaml/cyaml.pyi
vendored
2
third_party/2and3/yaml/cyaml.pyi
vendored
@@ -1,6 +1,6 @@
|
||||
from _typeshed import SupportsRead
|
||||
from typing import IO, Any, Mapping, Optional, Sequence, Text, Union
|
||||
|
||||
from _typeshed import SupportsRead
|
||||
from yaml.constructor import BaseConstructor, Constructor, SafeConstructor
|
||||
from yaml.representer import BaseRepresenter, Representer, SafeRepresenter
|
||||
from yaml.resolver import BaseResolver, Resolver
|
||||
|
||||
1
third_party/3/waitress/trigger.pyi
vendored
1
third_party/3/waitress/trigger.pyi
vendored
@@ -2,7 +2,6 @@ import sys
|
||||
from socket import SocketType
|
||||
from threading import Lock
|
||||
from typing import Callable, Mapping, Optional
|
||||
|
||||
from typing_extensions import Literal
|
||||
|
||||
from . import wasyncore as wasyncore
|
||||
|
||||
Reference in New Issue
Block a user