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

Skip to content
Merged
Show file tree
Hide file tree
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
Avoid duplicate checking of alias targets
  • Loading branch information
ilevkivskyi committed Sep 8, 2025
commit 02d3d12c4273cf9df09ee5bf6899ef22e40795f4
2 changes: 2 additions & 0 deletions mypy/mixedtraverser.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ def visit_class_def(self, o: ClassDef, /) -> None:
if info:
for base in info.bases:
base.accept(self)
if info.special_alias:
info.special_alias.accept(self)

def visit_type_alias_expr(self, o: TypeAliasExpr, /) -> None:
super().visit_type_alias_expr(o)
Expand Down
2 changes: 0 additions & 2 deletions mypy/semanal_typeargs.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ def visit_type_alias_type(self, t: TypeAliasType) -> None:
if not is_error:
# If there was already an error for the alias itself, there is no point in checking
# the expansion, most likely it will result in the same kind of error.
if t.alias is not None:
t.alias.accept(self)
if t.args:
# Since we always allow unbounded type variables in alias definitions, we need
# to verify the arguments satisfy the upper bounds of the expansion as well.
Expand Down
Loading