File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -3373,7 +3373,7 @@ def analyze_alias(
33733373 tvar_def = self .tvar_scope .bind_new (name , tvar_expr )
33743374 tvar_defs .append (tvar_def )
33753375
3376- res = analyze_type_alias (
3376+ analyzed , depends_on = analyze_type_alias (
33773377 typ ,
33783378 self ,
33793379 self .tvar_scope ,
@@ -3385,13 +3385,8 @@ def analyze_alias(
33853385 global_scope = global_scope ,
33863386 allowed_alias_tvars = tvar_defs ,
33873387 )
3388- analyzed : Type | None = None
3389- if res :
3390- analyzed , depends_on = res
3391- qualified_tvars = [node .fullname for (name , node ) in found_type_vars ]
3392- else :
3393- depends_on = set ()
3394- qualified_tvars = []
3388+
3389+ qualified_tvars = [node .fullname for _name , node in found_type_vars ]
33953390 return analyzed , tvar_defs , depends_on , qualified_tvars
33963391
33973392 def is_pep_613 (self , s : AssignmentStmt ) -> bool :
Original file line number Diff line number Diff line change @@ -132,12 +132,12 @@ def analyze_type_alias(
132132 in_dynamic_func : bool = False ,
133133 global_scope : bool = True ,
134134 allowed_alias_tvars : list [TypeVarLikeType ] | None = None ,
135- ) -> tuple [Type , set [str ]] | None :
135+ ) -> tuple [Type , set [str ]]:
136136 """Analyze r.h.s. of a (potential) type alias definition.
137137
138138 If `node` is valid as a type alias rvalue, return the resulting type and a set of
139139 full names of type aliases it depends on (directly or indirectly).
140- Return None otherwise. 'node' must have been semantically analyzed.
140+ 'node' must have been semantically analyzed.
141141 """
142142 analyzer = TypeAnalyser (
143143 api ,
You can’t perform that action at this time.
0 commit comments