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 Sep 2, 2023
1 parent 2bd91d5 commit 61b6476
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mypy/typeops.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,9 @@ def class_callable(
# this case (although we should probably change it at some point)
# See testValueTypeWithNewInParentClass
# Also see testSelfTypeInGenericClassUsedFromAnotherGenericClass1
if (
not is_subtype(default_ret_type, explicit_type, ignore_type_params=True)
or is_subtype(explicit_type, default_ret_type, ignore_type_params=True)
):
if not is_subtype(
default_ret_type, explicit_type, ignore_type_params=True
) or is_subtype(explicit_type, default_ret_type, ignore_type_params=True):
ret_type = explicit_type
elif (
# We have to skip protocols, because it can be a subtype of a return type
Expand Down

0 comments on commit 61b6476

Please sign in to comment.