Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix CI
  • Loading branch information
sobolevn committed Dec 10, 2023
commit 23acb5c65ca34a36d73bea2cca91e13e9045ae38
4 changes: 2 additions & 2 deletions mypy/semanal.py
Original file line number Diff line number Diff line change
Expand Up @@ -3556,7 +3556,7 @@ def check_and_set_up_type_alias(self, s: AssignmentStmt) -> bool:

# It can be `A = TypeAliasType('A', ...)` call, in this case,
# we just take the second argument and analyze it:
if self.check_type_alias_type_call(lvalue.name, s.rvalue):
if self.check_type_alias_type_call(s.rvalue, name=lvalue.name):
rvalue = s.rvalue.args[1]
else:
rvalue = s.rvalue
Expand Down Expand Up @@ -3719,7 +3719,7 @@ def check_and_set_up_type_alias(self, s: AssignmentStmt) -> bool:
self.note("Use variable annotation syntax to define protocol members", s)
return True

def check_type_alias_type_call(self, name: str, rvalue: Expression) -> TypeGuard[CallExpr]:
def check_type_alias_type_call(self, rvalue: Expression, *, name: str) -> TypeGuard[CallExpr]:
if not isinstance(rvalue, CallExpr):
return False

Expand Down