Skip to content

Commit b167022

Browse files
committed
remove redundant check for typeguard and typeis
1 parent c4f1877 commit b167022

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

mypy/constraints.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,14 +1029,10 @@ def visit_callable_type(self, template: CallableType) -> list[Constraint]:
10291029
if template.type_guard is not None and cactual.type_guard is not None:
10301030
template_ret_type = template.type_guard
10311031
cactual_ret_type = cactual.type_guard
1032-
elif template.type_guard is not None:
1033-
template_ret_type = AnyType(TypeOfAny.special_form)
10341032

10351033
if template.type_is is not None and cactual.type_is is not None:
10361034
template_ret_type = template.type_is
10371035
cactual_ret_type = cactual.type_is
1038-
elif template.type_is is not None:
1039-
template_ret_type = AnyType(TypeOfAny.special_form)
10401036

10411037
res.extend(infer_constraints(template_ret_type, cactual_ret_type, self.direction))
10421038

0 commit comments

Comments
 (0)