Argument#

class src.pyconverter.xml2py.ast_tree.Argument(terms, element: str | Element, initial_arguments: List, description: Element | str | None = None)#

Argument object.

Overview#

resized_description

Resize the description to a maximum length.

to_py_docstring

Return a list of string to enable converting the element to an RST format.

py_arg_name

Python-compatible term.

description

Description of the argument.

is_arg_elipsis

Check if the argument is an elipsis.

multiple_args

types

One or more parameter types.

Import detail#

from src.pyconverter.xml2py.ast_tree import Argument

Property detail#

property Argument.py_arg_name: str#

Python-compatible term.

property Argument.description: str#

Description of the argument.

property Argument.is_arg_elipsis#

Check if the argument is an elipsis.

Returns:
bool

True if the argument is an elipsis, False otherwise.

property Argument.multiple_args#
property Argument.types: List[type]#

One or more parameter types.

This is guessed from any subvarlists. If unavailable, then it’s guessed from the description of the variable.

This is either a string, float, or integer (or some combination thereof).

Method detail#

Argument.resized_description(description: str | None = None, max_length: int = 100, indent: str = '') List[str]#

Resize the description to a maximum length.

Argument.to_py_docstring(max_length=100, links=None, base_url=None, fcache=None) List[str]#

Return a list of string to enable converting the element to an RST format.