eric7.Plugins.CheckerPlugins.CodeStyleChecker.NameOrder.ImportNode

Module implementing a class representing an import or import from node.

Global Attributes

None

Classes

ImportNode Class representing an import or import from node.
ImportNodeError Class representing an exception for an invalid import node.

Functions

None


ImportNode

Class representing an import or import from node.

Derived from

None

Class Attributes

None

Class Methods

None

Methods

ImportNode Constructor
__eq__ Special method implementing the equality operator.
__lt__ Special method implementing the less than operator.
__str__ Special method to create a string representation of the instance.

Static Methods

None

ImportNode (Constructor)

ImportNode(appNames, astNode, checker, sortIgnoringStyle, sortFromFirst)

Constructor

appNames (list of str)
list of application package names
astNode (ast.AST)
reference to the ast node
checker (ImportsChecker)
reference to the checker object
sortIgnoringStyle (bool)
flag indicating to sort ignoring the import style
sortFromFirst (bool)
flag indicating to sort from imports before straight ones
Raises ImportNodeError:
raised to indicate an invalid node was given to this class

ImportNode.__eq__

__eq__(other)

Special method implementing the equality operator.

other (ImportNode)
reference to the object to compare
Return:
flag indicating equality
Return Type:
bool

ImportNode.__lt__

__lt__(other)

Special method implementing the less than operator.

other (ImportNode)
reference to the object to compare
Return:
flag indicating a less than situation
Return Type:
bool

ImportNode.__str__

__str__()

Special method to create a string representation of the instance.

Return:
string representation of the instance
Return Type:
str
Raises ImportNodeError:
raised to indicate an invalid node was given to this class
Up


ImportNodeError

Class representing an exception for an invalid import node.

Derived from

Exception

Class Attributes

None

Class Methods

None

Methods

None

Static Methods

None
Up