mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 20:45:49 +08:00
[stdlib/enum] add enum.bin (#15388)
docs: https://docs.python.org/dev/library/enum.html#enum.bin source: https://github.com/python/cpython/blob/3.11/Lib/enum.py#L132-L154
This commit is contained in:
+2
-1
@@ -4,7 +4,7 @@ import types
|
||||
from _typeshed import SupportsKeysAndGetItem, Unused
|
||||
from builtins import property as _builtins_property
|
||||
from collections.abc import Callable, Iterable, Iterator, Mapping
|
||||
from typing import Any, Final, Generic, Literal, TypeVar, overload
|
||||
from typing import Any, Final, Generic, Literal, SupportsIndex, TypeVar, overload
|
||||
from typing_extensions import Self, TypeAlias, disjoint_base
|
||||
|
||||
__all__ = ["EnumMeta", "Enum", "IntEnum", "Flag", "IntFlag", "auto", "unique"]
|
||||
@@ -311,6 +311,7 @@ if sys.version_info >= (3, 11):
|
||||
def global_enum_repr(self: Enum) -> str: ...
|
||||
def global_flag_repr(self: Flag) -> str: ...
|
||||
def show_flag_values(value: int) -> list[int]: ...
|
||||
def bin(num: SupportsIndex, max_bits: int | None = None) -> str: ...
|
||||
|
||||
if sys.version_info >= (3, 12):
|
||||
# The body of the class is the same, but the base classes are different.
|
||||
|
||||
Reference in New Issue
Block a user