# eric7.Plugins.CheckerPlugins.CodeStyleChecker.Imports.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.
ImportNodeException | 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)

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

Raises ImportNodeException:
  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 ImportNodeException:
  raised to indicate an invalid node was given to this class

Up

## ImportNodeException

Class representing an exception for an invalid import node.

### Derived from

Exception

### Class Attributes

None

### Class Methods

None

### Methods

None

### Static Methods

None

Up