File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 2727 LiteralType ,
2828 ProperType ,
2929 Type ,
30+ UnionType ,
3031 get_proper_type ,
3132 is_named_instance ,
32- UnionType ,
33- LiteralType ,
3433)
3534
3635ENUM_NAME_ACCESS : Final = {f"{ prefix } .name" for prefix in ENUM_BASES } | {
@@ -65,7 +64,9 @@ def enum_name_callback(ctx: mypy.plugin.AttributeContext) -> Type:
6564
6665 # Or `field: SomeEnum = SomeEnum.field; field.name` case,
6766 # Or `field: Literal[Some.A, Some.B]; field.name` case:
68- enum_names = _extract_enum_names_from_type (ctx .type ) or _extract_enum_names_from_literal_union (ctx .type )
67+ enum_names = _extract_enum_names_from_type (ctx .type ) or _extract_enum_names_from_literal_union (
68+ ctx .type
69+ )
6970 if enum_names :
7071 str_type = ctx .api .named_generic_type ("builtins.str" , [])
7172 return make_simplified_union (
You can’t perform that action at this time.
0 commit comments