|
| declare_attrs (cls, *args, **kwargs) |
| Initialize the attributes of this node.
|
|
| __init__ (self, *args, **kwargs) |
|
| get_specifiers_from_processors (cls, "BaseSpecification" spec) |
| Get the specifiers that have been set from processors.
|
|
| reset_specifiers_from_processors (cls, Optional[Type] processor=None) |
| Reset the specifiers that have been set from processors.
|
|
| reset_processor_elems (cls, Optional[Type] processor=None) |
|
| recognize_all (cls, bool recognize_all=True) |
| Set whether all attributes under this node should be recognized.
|
|
str | get_tag (self) |
| Get the tag of this node.
|
|
Iterable[Tuple[Union[str, int], Any]] | items (self) |
| Get iterable of (key, value) or (index, value) pairs.
|
|
T | combine_index (self, Union[str, int] key, T value) |
| Combine the value at the given key with the given value.
|
|
str | get_name (self, Union[Set, None] seen=None) |
| Get the name of this node.
|
|
| check_unrecognized (self, bool ignore_empty=False, ignore_should_have_been_removed_by=False) |
| Check for unrecognized keys in this node and all subnodes.
|
|
Any | recursive_apply (self, callable func, bool self_first=False, set applied_to=None) |
| Apply a function to this node and all subnodes.
|
|
| clean_empties (self) |
| Remove empty nodes from this node and all subnodes.
|
|
bool | isempty (self) |
| Return True if this node is empty.
|
|
bool | isempty_recursive (self) |
| Return True if this node or all subnodes are empty.
|
|
| add_attr (cls, str key_or_tag, Optional[Union[type, Tuple[type,...], Tuple[None,...], Tuple[str,...], None]] required_type=None, Any default=default_unspecified_, Optional[Callable] callfunc=None, Optional[bool] part_name_match=None, Optional[bool] no_change_key=None, Any _processor_responsible_for_removing=None, Optional[Dict[str, TypeSpecifier]] _add_checker_to=None) |
| Initialize a type specifier for this class.
|
|
List[T] | get_nodes_of_type (self, Type[T] node_type) |
| Return a list of all subnodes of a given type.
|
|
Callable | get_setter_lambda (self, Union[str, int] keytag) |
| Get a function that can be used to set a value in this node.
|
|
Callable | get_combiner_lambda (self, Union[str, int] keytag) |
| Get a function that can be used to combine a value to this node.
|
|
List[Tuple[Any, Callable]] | get_setters_for_keytag (self, str keytag, bool recursive=True) |
| Get a list of tuples of the form (value, setter) for all keys/tags in this node that match the given key/tag.
|
|
List[Tuple[Any, Callable]] | get_combiners_for_keytag (self, str keytag, bool recursive=True) |
| Get a list of tuples of the form (value, combiner) for all keys/tags in this node that match the given key/tag.
|
|
List[Tuple[Any, Callable]] | get_setters_for_type (self, Type t, bool recursive=True) |
| Get a list of tuples of the form (value, setter) for all keys/tags in this node that match the given type.
|
|
List[Tuple[Any, Callable]] | get_combiners_for_type (self, Type t, bool recursive=True) |
| Get a list of tuples of the form (value, combiner) for all keys/tags in this node that match the given type.
|
|
| __str__ (self) |
| Return the name of this node.
|
|
| __format__ (self, format_spec) |
| Formats the name of this node.
|
|
bool | is_defined_non_default_non_empty (self, str key) |
| Returns True if the given key is defined in this node and is not the default value and is not empty.
|
|
Any | __getitem__ (self, Union[str, int] key) |
| Get the value at the given key or index.
|
|
| __setitem__ (self, Union[str, int] key, Any value) |
| Set the value at the given key or index.
|
|
| parse_expressions (self, Optional[Dict[str, Any]] symbol_table=None, Optional[set] parsed_ids=None, Optional[Callable] callfunc=None) |
| Parse expressions in this node and all subnodes.
|
|
| unique_class_name (cls) |
| Return a unique name for this class.
|
|