Skip to content

Commit f319685

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 0f622ed commit f319685

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

mypy/typeops.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
)
3131
from mypy.state import state
3232
from mypy.types import (
33-
ENUM_REMOVED_PROPS,
3433
AnyType,
3534
CallableType,
3635
ExtraAttrs,
@@ -879,8 +878,7 @@ class Status(Enum):
879878
elif isinstance(typ, Instance) and typ.type.fullname == target_fullname:
880879
if typ.type.is_enum:
881880
return make_simplified_union(
882-
[LiteralType(name, typ) for name in typ.get_enum_values()],
883-
contract_literals=False,
881+
[LiteralType(name, typ) for name in typ.get_enum_values()], contract_literals=False
884882
)
885883
elif typ.type.fullname == "builtins.bool":
886884
return make_simplified_union(

mypy/types.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,8 @@ def is_singleton_type(self) -> bool:
14961496
def get_enum_values(self) -> list[str]:
14971497
"""Return the list of values for an Enum."""
14981498
return [
1499-
name for name, sym in self.type.names.items()
1499+
name
1500+
for name, sym in self.type.names.items()
15001501
if (
15011502
isinstance(sym.node, mypy.nodes.Var)
15021503
and name not in ENUM_REMOVED_PROPS

0 commit comments

Comments
 (0)