mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 22:56:55 +08:00
Literal: always import from typing_extensions for simplicity (#4219)
This commit is contained in:
6
third_party/2and3/dateutil/easter.pyi
vendored
6
third_party/2and3/dateutil/easter.pyi
vendored
@@ -1,9 +1,5 @@
|
||||
from datetime import date
|
||||
import sys
|
||||
if sys.version_info >= (3, 8):
|
||||
from typing import Literal
|
||||
else:
|
||||
from typing_extensions import Literal
|
||||
from typing_extensions import Literal
|
||||
|
||||
EASTER_JULIAN: Literal[1]
|
||||
EASTER_ORTHODOX: Literal[2]
|
||||
|
||||
14
third_party/2and3/jinja2/utils.pyi
vendored
14
third_party/2and3/jinja2/utils.pyi
vendored
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from typing import Any, Callable, IO, 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
|
||||
@@ -8,24 +8,18 @@ missing: Any
|
||||
internal_code: Any
|
||||
concat: Any
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
from typing import Literal
|
||||
_True = Literal[True]
|
||||
else:
|
||||
_True = bool
|
||||
|
||||
_CallableT = TypeVar("_CallableT", bound=Callable[..., Any])
|
||||
|
||||
class _ContextFunction(Protocol[_CallableT]):
|
||||
contextfunction: _True
|
||||
contextfunction: Literal[True]
|
||||
__call__: _CallableT
|
||||
|
||||
class _EvalContextFunction(Protocol[_CallableT]):
|
||||
evalcontextfunction: _True
|
||||
evalcontextfunction: Literal[True]
|
||||
__call__: _CallableT
|
||||
|
||||
class _EnvironmentFunction(Protocol[_CallableT]):
|
||||
environmentfunction: _True
|
||||
environmentfunction: Literal[True]
|
||||
__call__: _CallableT
|
||||
|
||||
def contextfunction(f: _CallableT) -> _ContextFunction[_CallableT]: ...
|
||||
|
||||
6
third_party/2and3/werkzeug/wrappers.pyi
vendored
6
third_party/2and3/werkzeug/wrappers.pyi
vendored
@@ -3,6 +3,7 @@ from datetime import datetime
|
||||
from typing import (
|
||||
Any, Callable, Iterable, Iterator, Mapping, MutableMapping, Optional, Sequence, Text, Tuple, Type, TypeVar, Union, overload
|
||||
)
|
||||
from typing_extensions import Literal
|
||||
from _typeshed.wsgi import WSGIEnvironment, InputStream
|
||||
|
||||
from .datastructures import (
|
||||
@@ -12,11 +13,6 @@ from .datastructures import (
|
||||
)
|
||||
from .useragents import UserAgent
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
from typing import Literal
|
||||
else:
|
||||
from typing_extensions import Literal
|
||||
|
||||
class BaseRequest:
|
||||
charset: str
|
||||
encoding_errors: str
|
||||
|
||||
Reference in New Issue
Block a user