Skip to content

Conversation

viclpk
Copy link

@viclpk viclpk commented Jan 21, 2025

The Node class represents a node with an 'id' and 'parent', ensuring valid values through type hints and validation. It includes methods for initialization, string representation, and equality comparison.

The NodeManager class manages a list of Node objects, with methods for retrieving, adding, and removing nodes. It includes a cascade removal feature, which ensures that nodes and their children are properly removed from the list. The class also validates that the input is a list of Node instances and prevents mutations to the original list.

The Node class represents a node with an 'id' and 'parent', ensuring valid values through type hints and validation. It includes methods for initialization, string representation, and equality comparison.

The NodeManager class manages a list of Node objects, with methods for retrieving, adding, and removing nodes. It includes a cascade removal feature, which ensures that nodes and their children are properly removed from the list. The class also validates that the input is a list of Node instances and prevents mutations to the original list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant