Skip to content

Commit

Permalink
Address review
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Jan 17, 2025
1 parent ddc8612 commit 50377fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions mypy/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -6037,6 +6037,8 @@ def find_isinstance_check_helper(
# Also note that a care must be taken to unwrap this back at read places
# where we use this to narrow down declared type.
with self.msg.filter_errors(), self.local_type_map():
# `node.callee` can be an `overload`ed function,
# we need to resolve the real `overload` case.
_, real_func = self.expr_checker.check_call(
get_proper_type(self.lookup_type(node.callee)),
node.args,
Expand Down
2 changes: 1 addition & 1 deletion mypy/checkexpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -6565,7 +6565,7 @@ def all_same_types(types: list[Type]) -> bool:


def all_same_type_narrowers(types: list[CallableType]) -> bool:
if not types:
if len(types) <= 1:
return True

type_guards: list[Type] = []
Expand Down

0 comments on commit 50377fa

Please sign in to comment.