funtracks.actions.update_node_attrs
Classes:
Name | Description |
---|---|
UpdateNodeAttrs |
Action for user updates to node attributes. Cannot update protected |
UpdateNodeAttrs
UpdateNodeAttrs(tracks: SolutionTracks, node: Node, attrs: dict[str, Any])
Bases: TracksAction
Action for user updates to node attributes. Cannot update protected attributes (time, area, track id), as these are controlled by internal application logic.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
Tracks
|
The tracks to update the node attributes for |
required |
|
Node
|
The node to update the attributes for |
required |
|
dict[str, Any]
|
A mapping from attribute name to list of new attribute values for the given nodes. |
required |
Raises:
Type | Description |
---|---|
ValueError
|
If a protected attribute is in the given attribute mapping. |
Methods:
Name | Description |
---|---|
inverse |
Restore previous attributes |
Source code in src/funtracks/actions/update_node_attrs.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
|
inverse
inverse() -> TracksAction
Restore previous attributes
Source code in src/funtracks/actions/update_node_attrs.py
51 52 53 54 55 56 57 |
|