mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Upgrade black to 21.4b0 and reformat (#5250)
This introduces newlines before decorators.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# typeshed is released on PyPI.
|
||||
git+https://github.com/python/mypy.git@master
|
||||
typed-ast>=1.0.4
|
||||
black==20.8b1
|
||||
black==21.4b0
|
||||
flake8==3.8.4
|
||||
flake8-bugbear==20.1.4
|
||||
flake8-pyi==20.10.0
|
||||
|
||||
@@ -2,6 +2,7 @@ from typing import Any, Callable, Dict, Iterable, Optional, Tuple, TypeVar, over
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_S = TypeVar("_S")
|
||||
|
||||
@overload
|
||||
def reduce(function: Callable[[_T, _T], _T], sequence: Iterable[_T]) -> _T: ...
|
||||
@overload
|
||||
|
||||
@@ -5,6 +5,7 @@ _AnyCallable = Callable[..., Any]
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_S = TypeVar("_S")
|
||||
|
||||
@overload
|
||||
def reduce(function: Callable[[_T, _T], _T], sequence: Iterable[_T]) -> _T: ...
|
||||
@overload
|
||||
|
||||
@@ -38,6 +38,7 @@ _T3 = TypeVar("_T3")
|
||||
_T4 = TypeVar("_T4")
|
||||
_T5 = TypeVar("_T5")
|
||||
_T6 = TypeVar("_T6")
|
||||
|
||||
@overload
|
||||
def imap(func: Callable[[_T1], _S], iter1: Iterable[_T1]) -> Iterator[_S]: ...
|
||||
@overload
|
||||
|
||||
@@ -69,6 +69,7 @@ _BytesToBytesEncodingT = Literal[
|
||||
"zlib",
|
||||
"zlib_codec",
|
||||
]
|
||||
|
||||
@overload
|
||||
def encode(obj: bytes, encoding: _BytesToBytesEncodingT, errors: str = ...) -> bytes: ...
|
||||
@overload
|
||||
|
||||
@@ -9,6 +9,7 @@ _T = TypeVar("_T")
|
||||
class _MISSING_TYPE: ...
|
||||
|
||||
MISSING: _MISSING_TYPE
|
||||
|
||||
@overload
|
||||
def asdict(obj: Any) -> Dict[str, Any]: ...
|
||||
@overload
|
||||
|
||||
@@ -80,6 +80,7 @@ LOCK_RW: int
|
||||
LOCK_SH: int
|
||||
LOCK_UN: int
|
||||
LOCK_WRITE: int
|
||||
|
||||
@overload
|
||||
def fcntl(__fd: FileDescriptorLike, __cmd: int, __arg: int = ...) -> int: ...
|
||||
@overload
|
||||
@@ -87,6 +88,7 @@ def fcntl(__fd: FileDescriptorLike, __cmd: int, __arg: bytes) -> bytes: ...
|
||||
|
||||
_ReadOnlyBuffer = bytes
|
||||
_WritableBuffer = Union[bytearray, memoryview, array[Any]]
|
||||
|
||||
@overload
|
||||
def ioctl(__fd: FileDescriptorLike, __request: int, __arg: int = ..., __mutate_flag: bool = ...) -> int: ...
|
||||
@overload
|
||||
|
||||
@@ -25,6 +25,7 @@ _AnyCallable = Callable[..., Any]
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_S = TypeVar("_S")
|
||||
|
||||
@overload
|
||||
def reduce(function: Callable[[_T, _S], _T], sequence: Iterable[_S], initial: _T) -> _T: ...
|
||||
@overload
|
||||
|
||||
@@ -29,6 +29,7 @@ class GNUTranslations(NullTranslations):
|
||||
def find(domain: str, localedir: Optional[StrPath] = ..., languages: Optional[Iterable[str]] = ..., all: bool = ...) -> Any: ...
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
@overload
|
||||
def translation(
|
||||
domain: str,
|
||||
|
||||
@@ -3,6 +3,7 @@ from typing import Any, Dict, Generic, Iterable, List, Mapping, Optional, Tuple,
|
||||
|
||||
_DataType = Union[str, Mapping[str, Union[str, Morsel[Any]]]]
|
||||
_T = TypeVar("_T")
|
||||
|
||||
@overload
|
||||
def _quote(str: None) -> None: ...
|
||||
@overload
|
||||
|
||||
@@ -433,6 +433,7 @@ if sys.platform != "win32":
|
||||
def unsetenv(__name: Union[bytes, str]) -> None: ...
|
||||
|
||||
_Opener = Callable[[str, int], int]
|
||||
|
||||
@overload
|
||||
def fdopen(
|
||||
fd: int,
|
||||
|
||||
@@ -149,6 +149,7 @@ WUNTRACED: int
|
||||
XATTR_CREATE: int
|
||||
XATTR_REPLACE: int
|
||||
XATTR_SIZE_MAX: int
|
||||
|
||||
@overload
|
||||
def listdir(path: Optional[str] = ...) -> List[str]: ...
|
||||
@overload
|
||||
|
||||
@@ -33,6 +33,7 @@ class WSGIRequestHandler(BaseHTTPRequestHandler):
|
||||
def demo_app(environ: WSGIEnvironment, start_response: StartResponse) -> List[bytes]: ...
|
||||
|
||||
_S = TypeVar("_S", bound=WSGIServer)
|
||||
|
||||
@overload
|
||||
def make_server(host: str, port: int, app: WSGIApplication, *, handler_class: Type[WSGIRequestHandler] = ...) -> WSGIServer: ...
|
||||
@overload
|
||||
|
||||
@@ -36,6 +36,7 @@ def unescape(s): ...
|
||||
# 'redirect' returns a werkzeug Response, unless you give it
|
||||
# another Response type to use instead.
|
||||
_RC = TypeVar("_RC", bound=Response)
|
||||
|
||||
@overload
|
||||
def redirect(location: str, code: int = ..., Response: None = ...) -> Response: ...
|
||||
@overload
|
||||
|
||||
@@ -26,6 +26,7 @@ def echo_via_pager(
|
||||
) -> None: ...
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
@overload
|
||||
def progressbar(
|
||||
iterable: Iterable[_T],
|
||||
|
||||
@@ -9,6 +9,7 @@ _T = TypeVar("_T")
|
||||
class _MISSING_TYPE: ...
|
||||
|
||||
MISSING: _MISSING_TYPE
|
||||
|
||||
@overload
|
||||
def asdict(obj: Any) -> Dict[str, Any]: ...
|
||||
@overload
|
||||
|
||||
@@ -2,6 +2,7 @@ from typing import Any, Callable, Iterable, Optional, TypeVar, Union, overload
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_S = TypeVar("_S")
|
||||
|
||||
@overload
|
||||
def first(iterable: Iterable[_T]) -> Optional[_T]: ...
|
||||
@overload
|
||||
|
||||
@@ -6,6 +6,7 @@ from .client import Pipeline, Redis
|
||||
_T = TypeVar("_T")
|
||||
|
||||
HIREDIS_AVAILABLE: bool
|
||||
|
||||
@overload
|
||||
def from_url(url: Text, db: Optional[int] = ..., *, decode_responses: Literal[True], **kwargs: Any) -> Redis[str]: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user