Classes | Functions | Variables
ros_introspection.setup_py Namespace Reference

Classes

class  SetupPy
 

Functions

def contains_quoted_string (container, s)
 
def get_source_segment (source, node)
 
def is_constant (el)
 
def python_collection_to_lines (obj, indent=4, multi_line=False)
 
def python_to_lines (obj, initial_length=0, indent=4)
 
def quote_string (s, quote_char="'")
 

Variables

 get_source_segment = ast.get_source_segment
 
dictionary HELPER_FUNCTIONS
 
string IMPORT_TEMPLATE = 'from {} import {}\n'
 
int LINE_LENGTH = 100
 
list QUOTE_CHARS = ['"', "'"]
 

Function Documentation

◆ contains_quoted_string()

def ros_introspection.setup_py.contains_quoted_string (   container,
  s 
)
Utility function to determine if the string is present in the container wrapped in some quote char

Definition at line 136 of file setup_py.py.

◆ get_source_segment()

def ros_introspection.setup_py.get_source_segment (   source,
  node 
)
Get source code segment of the *source* that generated *node*.
If some location information (`lineno`, `end_lineno`, `col_offset`,
or `end_col_offset`) is missing, return None.

Definition at line 16 of file setup_py.py.

◆ is_constant()

def ros_introspection.setup_py.is_constant (   el)

Definition at line 8 of file setup_py.py.

◆ python_collection_to_lines()

def ros_introspection.setup_py.python_collection_to_lines (   obj,
  indent = 4,
  multi_line = False 
)
Convert a python collection (list/tuple/dict) to a sequence of lines, NOT including brackets

   indent is the size of the indent
   multi_line determines whether lists and tuples should be spread on multiple lines by default a la
        multi_line=False : [1, 2, 3]
        multi_line=True  : [
                            1,
                            2,
                            3,
                           ]

Definition at line 50 of file setup_py.py.

◆ python_to_lines()

def ros_introspection.setup_py.python_to_lines (   obj,
  initial_length = 0,
  indent = 4 
)
Convert a python object to the properly formatted python code.

initial_length is the length of the string before the object
indent is the size of the indent that each line should have

Definition at line 94 of file setup_py.py.

◆ quote_string()

def ros_introspection.setup_py.quote_string (   s,
  quote_char = "'" 
)
Utility function to wrap an arbitrary string in a quote character

Definition at line 131 of file setup_py.py.

Variable Documentation

◆ get_source_segment

ros_introspection.setup_py.get_source_segment = ast.get_source_segment

Definition at line 11 of file setup_py.py.

◆ HELPER_FUNCTIONS

dictionary ros_introspection.setup_py.HELPER_FUNCTIONS
Initial value:
1 = {
2  'catkin_pkg.python_setup': 'generate_distutils_setup'
3 }

Definition at line 41 of file setup_py.py.

◆ IMPORT_TEMPLATE

string ros_introspection.setup_py.IMPORT_TEMPLATE = 'from {} import {}\n'

Definition at line 45 of file setup_py.py.

◆ LINE_LENGTH

int ros_introspection.setup_py.LINE_LENGTH = 100

Definition at line 47 of file setup_py.py.

◆ QUOTE_CHARS

list ros_introspection.setup_py.QUOTE_CHARS = ['"', "'"]

Definition at line 46 of file setup_py.py.



ros_introspection
Author(s):
autogenerated on Tue Jun 21 2022 03:01:38