From cfe69831e9a6dc8a4f9fbedc721035ea9515ba6d Mon Sep 17 00:00:00 2001 From: lazytype Date: Sat, 22 Feb 2020 00:40:33 -0500 Subject: [PATCH] Include typing for Enum __order__ attribute (#3541) 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_` --- stdlib/3/enum.pyi | 1 + third_party/2/enum.pyi | 1 + 2 files changed, 2 insertions(+) diff --git a/stdlib/3/enum.pyi b/stdlib/3/enum.pyi index be22d386dbc7..8ffaa2b5eb1d 100644 --- a/stdlib/3/enum.pyi +++ b/stdlib/3/enum.pyi @@ -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 diff --git a/third_party/2/enum.pyi b/third_party/2/enum.pyi index be22d386dbc7..8ffaa2b5eb1d 100644 --- a/third_party/2/enum.pyi +++ b/third_party/2/enum.pyi @@ -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