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 = ['"', "'"] |
| 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.
| 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.
| def ros_introspection.setup_py.is_constant | ( | el | ) |
Definition at line 8 of file setup_py.py.
| 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.
| 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.
| 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.
| ros_introspection.setup_py.get_source_segment = ast.get_source_segment |
Definition at line 11 of file setup_py.py.
| dictionary ros_introspection.setup_py.HELPER_FUNCTIONS |
Definition at line 41 of file setup_py.py.
| string ros_introspection.setup_py.IMPORT_TEMPLATE = 'from {} import {}\n' |
Definition at line 45 of file setup_py.py.
| int ros_introspection.setup_py.LINE_LENGTH = 100 |
Definition at line 47 of file setup_py.py.
| list ros_introspection.setup_py.QUOTE_CHARS = ['"', "'"] |
Definition at line 46 of file setup_py.py.