mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Bump enum to 3.14 (#14021)
This commit is contained in:
@@ -38,9 +38,6 @@ ctypes.wintypes.HDROP
|
||||
ctypes.wintypes.HFILE
|
||||
ctypes.wintypes.HRESULT
|
||||
ctypes.wintypes.HSZ
|
||||
enum.Enum.__signature__
|
||||
enum.EnumMeta.__signature__
|
||||
enum.EnumType.__signature__
|
||||
faulthandler.dump_c_stack
|
||||
fractions.Fraction.__pow__
|
||||
fractions.Fraction.__rpow__
|
||||
|
||||
+5
-1
@@ -53,6 +53,7 @@ _EnumerationT = TypeVar("_EnumerationT", bound=type[Enum])
|
||||
# >>> Enum('Foo', names={'RED': 1, 'YELLOW': 2})
|
||||
# <enum 'Foo'>
|
||||
_EnumNames: TypeAlias = str | Iterable[str] | Iterable[Iterable[str | Any]] | Mapping[str, Any]
|
||||
_Signature: TypeAlias = Any # TODO: Unable to import Signature from inspect module
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
class nonmember(Generic[_EnumMemberT]):
|
||||
@@ -166,6 +167,9 @@ class EnumMeta(type):
|
||||
if sys.version_info >= (3, 12):
|
||||
@overload
|
||||
def __call__(cls: type[_EnumMemberT], value: Any, *values: Any) -> _EnumMemberT: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
@property
|
||||
def __signature__(cls) -> _Signature: ...
|
||||
|
||||
_member_names_: list[str] # undocumented
|
||||
_member_map_: dict[str, Enum] # undocumented
|
||||
@@ -212,7 +216,7 @@ class Enum(metaclass=EnumMeta):
|
||||
if sys.version_info >= (3, 11):
|
||||
def __copy__(self) -> Self: ...
|
||||
def __deepcopy__(self, memo: Any) -> Self: ...
|
||||
if sys.version_info >= (3, 12):
|
||||
if sys.version_info >= (3, 12) and sys.version_info < (3, 14):
|
||||
@classmethod
|
||||
def __signature__(cls) -> str: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user