Skip to content

Commit

Permalink
Include typing for Enum __order__ attribute (#3541)
Browse files Browse the repository at this point in the history
Based on the behavior here: https://github.com/python/cpython/blob/0b41a922f95f62b620d5a197b9f2ed8e4bb70730/Lib/enum.py#L91
the `__order__` attribute should be treated the same as `_order_`
  • Loading branch information
lazytype authored Feb 22, 2020
1 parent 7d8e2c8 commit cfe6983
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions stdlib/3/enum.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class Enum(metaclass=EnumMeta):
_ignore_: Union[str, List[str]]
if sys.version_info >= (3, 6):
_order_: str
__order__: str
@classmethod
def _missing_(cls, value: object) -> Any: ...
@staticmethod
Expand Down
1 change: 1 addition & 0 deletions third_party/2/enum.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class Enum(metaclass=EnumMeta):
_ignore_: Union[str, List[str]]
if sys.version_info >= (3, 6):
_order_: str
__order__: str
@classmethod
def _missing_(cls, value: object) -> Any: ...
@staticmethod
Expand Down

0 comments on commit cfe6983

Please sign in to comment.