# eric7.Plugins.CheckerPlugins.CodeStyleChecker.AstUtilities

Module implementing some utility and compatibility functions for working with the ast module.

### Global Attributes

None

### Classes

None

### Functions

getValue | Function to extract the value of a node.
getValue | Function to extract the value of a node.
isBaseString | Function to check that a node is a bytes or string.
isBaseString | Function to check that a node is a bytes or string.
isBytes | Function to check that a node is a bytes.
isBytes | Function to check that a node is a bytes.
isNameConstant | Function to check that a node is a name constant.
isNameConstant | Function to check that a node is a name constant.
isNumber | Function to check that a node is a number.
isNumber | Function to check that a node is a number.
isString | Function to check that a node is a string.
isString | Function to check that a node is a string.

## getValue

getValue(node)

Function to extract the value of a node.

node (ast.Constant)
  reference to the node to extract the value from

Return:
  value of the node

Return Type:
  any

Raises TypeError:
  raised to indicate an unsupported type

Up

## getValue

getValue(node)

Function to extract the value of a node.

node (one of ast.Num, ast.Str, ast.Bytes or ast.NameConstant)
  reference to the node to extract the value from

Return:
  value of the node

Return Type:
  one of str, bytes, int

Raises TypeError:
  raised to indicate an unsupported type

Up

## isBaseString

isBaseString(node)

Function to check that a node is a bytes or string.

node (ast.AST)
  reference to the node to check

Return:
  flag indicating a bytes or string

Return Type:
  bool

Up

## isBaseString

isBaseString(node)

Function to check that a node is a bytes or string.

node (ast.AST)
  reference to the node to check

Return:
  flag indicating a bytes or string

Return Type:
  bool

Up

## isBytes

isBytes(node)

Function to check that a node is a bytes.

node (ast.AST)
  reference to the node to check

Return:
  flag indicating a bytes

Return Type:
  bool

Up

## isBytes

isBytes(node)

Function to check that a node is a bytes.

node (ast.AST)
  reference to the node to check

Return:
  flag indicating a bytes

Return Type:
  bool

Up

## isNameConstant

isNameConstant(node)

Function to check that a node is a name constant.

node (ast.AST)
  reference to the node to check

Return:
  flag indicating a name constant

Return Type:
  bool

Up

## isNameConstant

isNameConstant(node)

Function to check that a node is a name constant.

node (ast.AST)
  reference to the node to check

Return:
  flag indicating a name constant

Return Type:
  bool

Up

## isNumber

isNumber(node)

Function to check that a node is a number.

node (ast.AST)
  reference to the node to check

Return:
  flag indicating a number

Return Type:
  bool

Up

## isNumber

isNumber(node)

Function to check that a node is a number.

node (ast.AST)
  reference to the node to check

Return:
  flag indicating a number

Return Type:
  bool

Up

## isString

isString(node)

Function to check that a node is a string.

node (ast.AST)
  reference to the node to check

Return:
  flag indicating a string

Return Type:
  bool

Up

## isString

isString(node)

Function to check that a node is a string.

node (ast.AST)
  reference to the node to check

Return:
  flag indicating a string

Return Type:
  bool

Up