We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
EnumMeta.__bool__
1 parent f03d385 commit 5972da2Copy full SHA for 5972da2
stdlib/enum.pyi
@@ -5,6 +5,7 @@ from abc import ABCMeta
5
from builtins import property as _builtins_property
6
from collections.abc import Iterable, Iterator, Mapping
7
from typing import Any, TypeVar, Union, overload
8
+from typing_extensions import Literal
9
10
_T = TypeVar("_T")
11
_S = TypeVar("_S", bound=type[Enum])
@@ -54,6 +55,7 @@ class EnumMeta(ABCMeta):
54
55
@_builtins_property
56
def __members__(self: type[_T]) -> types.MappingProxyType[str, _T]: ...
57
def __len__(self) -> int: ...
58
+ def __bool__(self) -> Literal[True]: ...
59
if sys.version_info >= (3, 11):
60
# Simple value lookup
61
@overload # type: ignore[override]
0 commit comments