mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-30 08:04:24 +08:00
Use lowercase type everywhere (#6853)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Callable, Type, TypeVar, overload
|
||||
from typing import Any, Callable, TypeVar, overload
|
||||
from typing_extensions import Literal
|
||||
|
||||
_F = TypeVar("_F", bound=Callable[..., Any])
|
||||
@@ -8,9 +8,9 @@ class ClassicAdapter:
|
||||
reason: str
|
||||
version: str
|
||||
action: _Actions | None
|
||||
category: Type[Warning]
|
||||
category: type[Warning]
|
||||
def __init__(
|
||||
self, reason: str = ..., version: str = ..., action: _Actions | None = ..., category: Type[Warning] = ...
|
||||
self, reason: str = ..., version: str = ..., action: _Actions | None = ..., category: type[Warning] = ...
|
||||
) -> None: ...
|
||||
def get_deprecated_msg(self, wrapped: Callable[..., Any], instance: object) -> str: ...
|
||||
def __call__(self, wrapped: _F) -> Callable[[_F], _F]: ...
|
||||
@@ -19,5 +19,5 @@ class ClassicAdapter:
|
||||
def deprecated(__wrapped: _F) -> _F: ...
|
||||
@overload
|
||||
def deprecated(
|
||||
reason: str = ..., *, version: str = ..., action: _Actions | None = ..., category: Type[Warning] | None = ...
|
||||
reason: str = ..., *, version: str = ..., action: _Actions | None = ..., category: type[Warning] | None = ...
|
||||
) -> Callable[[_F], _F]: ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Callable, Type, TypeVar
|
||||
from typing import Any, Callable, TypeVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .classic import ClassicAdapter, _Actions
|
||||
@@ -10,14 +10,14 @@ class SphinxAdapter(ClassicAdapter):
|
||||
reason: str
|
||||
version: str
|
||||
action: _Actions | None
|
||||
category: Type[Warning]
|
||||
category: type[Warning]
|
||||
def __init__(
|
||||
self,
|
||||
directive: Literal["versionadded", "versionchanged", "deprecated"],
|
||||
reason: str = ...,
|
||||
version: str = ...,
|
||||
action: _Actions | None = ...,
|
||||
category: Type[Warning] = ...,
|
||||
category: type[Warning] = ...,
|
||||
) -> None: ...
|
||||
def __call__(self, wrapped: _F) -> Callable[[_F], _F]: ...
|
||||
|
||||
@@ -29,5 +29,5 @@ def deprecated(
|
||||
line_length: int = ...,
|
||||
*,
|
||||
action: _Actions | None = ...,
|
||||
category: Type[Warning] | None = ...,
|
||||
category: type[Warning] | None = ...,
|
||||
) -> Callable[[_F], _F]: ...
|
||||
|
||||
Reference in New Issue
Block a user