Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 10, 2024
1 parent 7c31a94 commit ef9a659
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mypy/types_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
AnyType,
CallableType,
Instance,
LiteralType,
NoneType,
Overloaded,
ParamSpecType,
Expand All @@ -26,7 +27,6 @@
TypeVarType,
UnionType,
UnpackType,
LiteralType,
flatten_nested_unions,
get_proper_type,
get_proper_types,
Expand Down Expand Up @@ -87,9 +87,7 @@ def is_bad_type_type_item(item: Type) -> bool:
if isinstance(item, (TypeType, LiteralType)):
return True
if isinstance(item, UnionType):
return any(
is_bad_type_type_item(typ) for typ in flatten_nested_unions(item.items)
)
return any(is_bad_type_type_item(typ) for typ in flatten_nested_unions(item.items))
return False


Expand Down

0 comments on commit ef9a659

Please sign in to comment.