Skip to content

Commit 12fa5c4

Browse files
jetpacktuxedoJelleZijlstra
authored andcommitted
Added defs for undocumented attrs on enums (#2941)
This should resolve #2934
1 parent 54069f4 commit 12fa5c4

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

stdlib/3/enum.pyi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NB: third_party/2/enum.pyi and stdlib/3.4/enum.pyi must remain consistent!
22
import sys
3-
from typing import Any, Iterator, List, Mapping, Type, TypeVar, Union
3+
from typing import Any, Dict, Iterator, List, Mapping, Type, TypeVar, Union
44
from abc import ABCMeta
55

66
_T = TypeVar('_T')
@@ -25,6 +25,9 @@ class Enum(metaclass=EnumMeta):
2525
value: Any
2626
_name_: str
2727
_value_: Any
28+
_member_names_: List[str] # undocumented
29+
_member_map_: Dict[str, Enum] # undocumented
30+
_value2member_map_: Dict[int, Enum] # undocumented
2831
if sys.version_info >= (3, 7):
2932
_ignore_: Union[str, List[str]]
3033
if sys.version_info >= (3, 6):

third_party/2/enum.pyi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NB: third_party/2/enum.pyi and stdlib/3.4/enum.pyi must remain consistent!
22
import sys
3-
from typing import Any, Iterator, List, Mapping, Type, TypeVar, Union
3+
from typing import Any, Dict, Iterator, List, Mapping, Type, TypeVar, Union
44
from abc import ABCMeta
55

66
_T = TypeVar('_T')
@@ -25,6 +25,9 @@ class Enum(metaclass=EnumMeta):
2525
value: Any
2626
_name_: str
2727
_value_: Any
28+
_member_names_: List[str] # undocumented
29+
_member_map_: Dict[str, Enum] # undocumented
30+
_value2member_map_: Dict[int, Enum] # undocumented
2831
if sys.version_info >= (3, 7):
2932
_ignore_: Union[str, List[str]]
3033
if sys.version_info >= (3, 6):

0 commit comments

Comments
 (0)