mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Use lowercase type everywhere (#6853)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import numbers
|
||||
import sys
|
||||
from types import TracebackType
|
||||
from typing import Any, Container, NamedTuple, Sequence, Type, TypeVar, Union, overload
|
||||
from typing import Any, Container, NamedTuple, Sequence, TypeVar, Union, overload
|
||||
|
||||
_Decimal = Union[Decimal, int]
|
||||
_DecimalNew = Union[Decimal, float, str, tuple[int, Sequence[int], int]]
|
||||
@@ -50,7 +50,7 @@ def getcontext() -> Context: ...
|
||||
def localcontext(ctx: Context | None = ...) -> _ContextManager: ...
|
||||
|
||||
class Decimal:
|
||||
def __new__(cls: Type[_DecimalT], value: _DecimalNew = ..., context: Context | None = ...) -> _DecimalT: ...
|
||||
def __new__(cls: type[_DecimalT], value: _DecimalNew = ..., context: Context | None = ...) -> _DecimalT: ...
|
||||
@classmethod
|
||||
def from_float(cls, __f: float) -> Decimal: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
@@ -146,7 +146,7 @@ class Decimal:
|
||||
def rotate(self, other: _Decimal, context: Context | None = ...) -> Decimal: ...
|
||||
def scaleb(self, other: _Decimal, context: Context | None = ...) -> Decimal: ...
|
||||
def shift(self, other: _Decimal, context: Context | None = ...) -> Decimal: ...
|
||||
def __reduce__(self) -> tuple[Type[Decimal], tuple[str]]: ...
|
||||
def __reduce__(self) -> tuple[type[Decimal], tuple[str]]: ...
|
||||
def __copy__(self) -> Decimal: ...
|
||||
def __deepcopy__(self, __memo: Any) -> Decimal: ...
|
||||
def __format__(self, __specifier: str, __context: Context | None = ...) -> str: ...
|
||||
@@ -156,9 +156,9 @@ class _ContextManager:
|
||||
saved_context: Context
|
||||
def __init__(self, new_context: Context) -> None: ...
|
||||
def __enter__(self) -> Context: ...
|
||||
def __exit__(self, t: Type[BaseException] | None, v: BaseException | None, tb: TracebackType | None) -> None: ...
|
||||
def __exit__(self, t: type[BaseException] | None, v: BaseException | None, tb: TracebackType | None) -> None: ...
|
||||
|
||||
_TrapType = Type[DecimalException]
|
||||
_TrapType = type[DecimalException]
|
||||
|
||||
class Context:
|
||||
prec: int
|
||||
@@ -184,7 +184,7 @@ class Context:
|
||||
# __setattr__() only allows to set a specific set of attributes,
|
||||
# already defined above.
|
||||
def __delattr__(self, __name: str) -> None: ...
|
||||
def __reduce__(self) -> tuple[Type[Context], tuple[Any, ...]]: ...
|
||||
def __reduce__(self) -> tuple[type[Context], tuple[Any, ...]]: ...
|
||||
def clear_flags(self) -> None: ...
|
||||
def clear_traps(self) -> None: ...
|
||||
def copy(self) -> Context: ...
|
||||
|
||||
Reference in New Issue
Block a user