98 |
98 |
99 @param node reference to the AST Attribute node |
99 @param node reference to the AST Attribute node |
100 @type ast.Attribute |
100 @type ast.Attribute |
101 """ |
101 """ |
102 if ( |
102 if ( |
103 node.attr in AnnotationsFutureVisitor.SimplifyableTypes |
103 node.attr in AnnotationsFutureVisitor.SimplifyableTypes and |
104 and isinstance(node.value, ast.Name) |
104 isinstance(node.value, ast.Name) and |
105 and node.value.id in self.__typingAliases |
105 node.value.id in self.__typingAliases |
106 ): |
106 ): |
107 self.__typingImports.append(f"{node.value.id}.{node.attr}") |
107 self.__typingImports.append(f"{node.value.id}.{node.attr}") |
108 |
108 |
109 self.generic_visit(node) |
109 self.generic_visit(node) |
110 |
110 |