@@ -196,21 +196,21 @@ def _populate_type_annotations_annotation(
196196 or a Subscript e.g. `Optional[type]` or an Attribute, e.g. `pylint.lint.linter`.
197197 """
198198 match node :
199- case nodes .Name (name = n ) if n not in all_used_type_annotations :
200- all_used_type_annotations [n ] = True
201- return n # type: ignore[no-any-return]
202- case nodes .Subscript (slice = s , value = v ):
199+ case nodes .Name (name = name ) if name not in all_used_type_annotations :
200+ all_used_type_annotations [name ] = True
201+ return name # type: ignore[no-any-return]
202+ case nodes .Subscript (slice = s , value = value ):
203203 # slice is the next nested type
204204 self ._populate_type_annotations_annotation (s , all_used_type_annotations )
205205 # value is the current type name: could be a Name or Attribute
206206 return self ._populate_type_annotations_annotation (
207- v , all_used_type_annotations
207+ value , all_used_type_annotations
208208 )
209- case nodes .Attribute (expr = e ):
209+ case nodes .Attribute (expr = expr ):
210210 # An attribute is a type like `pylint.lint.pylinter`. node.expr is the next level
211211 # up, could be another attribute
212212 return self ._populate_type_annotations_annotation (
213- e , all_used_type_annotations
213+ expr , all_used_type_annotations
214214 )
215215 return None
216216
0 commit comments