eric7/Plugins/CheckerPlugins/CodeStyleChecker/Annotations/AnnotationsFutureVisitor.py

branch
eric7
changeset 8783
04fe1beecd9c
parent 8773
3dd81b827455
child 8881
54e42bc2437a
equal deleted inserted replaced
8781:44f7736e76eb 8783:04fe1beecd9c
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

eric ide

mercurial