mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Use PEP 570 syntax in stdlib (#11250)
This commit is contained in:
@@ -13,61 +13,61 @@ _T = TypeVar("_T")
|
||||
|
||||
_NormalizationForm: TypeAlias = Literal["NFC", "NFD", "NFKC", "NFKD"]
|
||||
|
||||
def bidirectional(__chr: str) -> str: ...
|
||||
def category(__chr: str) -> str: ...
|
||||
def combining(__chr: str) -> int: ...
|
||||
def bidirectional(chr: str, /) -> str: ...
|
||||
def category(chr: str, /) -> str: ...
|
||||
def combining(chr: str, /) -> int: ...
|
||||
@overload
|
||||
def decimal(__chr: str) -> int: ...
|
||||
def decimal(chr: str, /) -> int: ...
|
||||
@overload
|
||||
def decimal(__chr: str, __default: _T) -> int | _T: ...
|
||||
def decomposition(__chr: str) -> str: ...
|
||||
def decimal(chr: str, default: _T, /) -> int | _T: ...
|
||||
def decomposition(chr: str, /) -> str: ...
|
||||
@overload
|
||||
def digit(__chr: str) -> int: ...
|
||||
def digit(chr: str, /) -> int: ...
|
||||
@overload
|
||||
def digit(__chr: str, __default: _T) -> int | _T: ...
|
||||
def digit(chr: str, default: _T, /) -> int | _T: ...
|
||||
|
||||
_EastAsianWidth: TypeAlias = Literal["F", "H", "W", "Na", "A", "N"]
|
||||
|
||||
def east_asian_width(__chr: str) -> _EastAsianWidth: ...
|
||||
def is_normalized(__form: _NormalizationForm, __unistr: str) -> bool: ...
|
||||
def lookup(__name: str | ReadOnlyBuffer) -> str: ...
|
||||
def mirrored(__chr: str) -> int: ...
|
||||
def east_asian_width(chr: str, /) -> _EastAsianWidth: ...
|
||||
def is_normalized(form: _NormalizationForm, unistr: str, /) -> bool: ...
|
||||
def lookup(name: str | ReadOnlyBuffer, /) -> str: ...
|
||||
def mirrored(chr: str, /) -> int: ...
|
||||
@overload
|
||||
def name(__chr: str) -> str: ...
|
||||
def name(chr: str, /) -> str: ...
|
||||
@overload
|
||||
def name(__chr: str, __default: _T) -> str | _T: ...
|
||||
def normalize(__form: _NormalizationForm, __unistr: str) -> str: ...
|
||||
def name(chr: str, default: _T, /) -> str | _T: ...
|
||||
def normalize(form: _NormalizationForm, unistr: str, /) -> str: ...
|
||||
@overload
|
||||
def numeric(__chr: str) -> float: ...
|
||||
def numeric(chr: str, /) -> float: ...
|
||||
@overload
|
||||
def numeric(__chr: str, __default: _T) -> float | _T: ...
|
||||
def numeric(chr: str, default: _T, /) -> float | _T: ...
|
||||
@final
|
||||
class UCD:
|
||||
# The methods below are constructed from the same array in C
|
||||
# (unicodedata_functions) and hence identical to the functions above.
|
||||
unidata_version: str
|
||||
def bidirectional(self, __chr: str) -> str: ...
|
||||
def category(self, __chr: str) -> str: ...
|
||||
def combining(self, __chr: str) -> int: ...
|
||||
def bidirectional(self, chr: str, /) -> str: ...
|
||||
def category(self, chr: str, /) -> str: ...
|
||||
def combining(self, chr: str, /) -> int: ...
|
||||
@overload
|
||||
def decimal(self, __chr: str) -> int: ...
|
||||
def decimal(self, chr: str, /) -> int: ...
|
||||
@overload
|
||||
def decimal(self, __chr: str, __default: _T) -> int | _T: ...
|
||||
def decomposition(self, __chr: str) -> str: ...
|
||||
def decimal(self, chr: str, default: _T, /) -> int | _T: ...
|
||||
def decomposition(self, chr: str, /) -> str: ...
|
||||
@overload
|
||||
def digit(self, __chr: str) -> int: ...
|
||||
def digit(self, chr: str, /) -> int: ...
|
||||
@overload
|
||||
def digit(self, __chr: str, __default: _T) -> int | _T: ...
|
||||
def east_asian_width(self, __chr: str) -> _EastAsianWidth: ...
|
||||
def is_normalized(self, __form: _NormalizationForm, __unistr: str) -> bool: ...
|
||||
def lookup(self, __name: str | ReadOnlyBuffer) -> str: ...
|
||||
def mirrored(self, __chr: str) -> int: ...
|
||||
def digit(self, chr: str, default: _T, /) -> int | _T: ...
|
||||
def east_asian_width(self, chr: str, /) -> _EastAsianWidth: ...
|
||||
def is_normalized(self, form: _NormalizationForm, unistr: str, /) -> bool: ...
|
||||
def lookup(self, name: str | ReadOnlyBuffer, /) -> str: ...
|
||||
def mirrored(self, chr: str, /) -> int: ...
|
||||
@overload
|
||||
def name(self, __chr: str) -> str: ...
|
||||
def name(self, chr: str, /) -> str: ...
|
||||
@overload
|
||||
def name(self, __chr: str, __default: _T) -> str | _T: ...
|
||||
def normalize(self, __form: _NormalizationForm, __unistr: str) -> str: ...
|
||||
def name(self, chr: str, default: _T, /) -> str | _T: ...
|
||||
def normalize(self, form: _NormalizationForm, unistr: str, /) -> str: ...
|
||||
@overload
|
||||
def numeric(self, __chr: str) -> float: ...
|
||||
def numeric(self, chr: str, /) -> float: ...
|
||||
@overload
|
||||
def numeric(self, __chr: str, __default: _T) -> float | _T: ...
|
||||
def numeric(self, chr: str, default: _T, /) -> float | _T: ...
|
||||
|
||||
Reference in New Issue
Block a user