Completing functionality for enum.auto (#1331)

Full context: https://github.com/python/mypy/pull/3441

Closes python/mypy#3434.
This commit is contained in:
mistermocha
2017-05-27 15:06:00 -07:00
committed by Jelle Zijlstra
parent f9872cafd8
commit 2053e5882f

View File

@@ -32,7 +32,8 @@ def unique(enumeration: _S) -> _S: ...
if sys.version_info >= (3, 6):
_auto_null = ... # type: Any
class auto:
# subclassing IntFlag so it picks up all implemented base functions, best modeling behavior of enum.auto()
class auto(IntFlag):
value = ... # type: Any
class Flag(Enum):