eric7/Plugins/CheckerPlugins/CodeStyleChecker/Imports/ImportNode.py

branch
eric7
changeset 8808
033fa34447d0
parent 8802
129a973fc33e
child 8881
54e42bc2437a
equal deleted inserted replaced
8807:f4486646a233 8808:033fa34447d0
40 @param checker reference to the checker object 40 @param checker reference to the checker object
41 @type ImportsChecker 41 @type ImportsChecker
42 @exception ImportNodeException raised to indicate an invalid node was 42 @exception ImportNodeException raised to indicate an invalid node was
43 given to this class 43 given to this class
44 """ 44 """
45 if ( 45 if not isinstance(astNode, (ast.Import, ast.ImportFrom)):
46 self.nodeType not in (NodeTypeEnum.IMPORT,
47 NodeTypeEnum.IMPORT_FROM)
48 ):
49 raise ImportNodeException( 46 raise ImportNodeException(
50 "Node type {0} not recognized".format(type(astNode)) 47 "Node type {0} not recognized".format(type(astNode))
51 ) 48 )
52 49
53 self.node = astNode 50 self.node = astNode

eric ide

mercurial