-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: update StateVertex to function like a normal component unless specified not to #2950
Conversation
The StateVertex class in types.py has been updated to inherit from the ComponentVertex class instead of the Vertex class. This change ensures that the StateVertex class has access to the methods and attributes of the ComponentVertex class, improving code organization and maintainability.
The Vertex class in base.py has been updated to include a new attribute `_successors_ids`. This attribute will store the IDs of the successors of the vertex. This change improves the functionality and flexibility of the Vertex class.
This commit adds a new method `_set_successors_ids` to the `NotifyComponent` class in `Notify.py`. This method retrieves the successors of the vertex and sets the `successors_ids` attribute accordingly. This change improves the functionality and flexibility of the `NotifyComponent` class.
This commit adds a new method `_set_successors_ids` to the `ListenComponent` class in `Listen.py`. This method retrieves the successors of the vertex and sets the `successors_ids` attribute accordingly. This change improves the functionality and flexibility of the `ListenComponent` class.
Pull Request Validation ReportThis comment is automatically generated by Conventional PR Whitelist Report
Result Pull request does not satisfy any enabled whitelist criteria. Pull request will be validated. Validation Report
Result Pull request satisfies all enabled pull request rules. Last Modified at 25 Jul 24 13:49 UTC |
This commit updates the StateVertex class in types.py to no longer be considered a state. The `is_state` attribute is set to False, ensuring that the vertex is not treated as a state. This change improves code clarity and aligns with the intended functionality of the class.
This commit sets the `is_state` attribute to True in the `ListenComponent` class in `Listen.py`. This change ensures that the `ListenComponent` is treated as a state and improves the functionality of the component.
This pull request is automatically being deployed by Amplify Hosting (learn more). |
This commit removes the `base_type` argument from the constructor of the `StateVertex` class in `types.py`. The `base_type` argument was not being used and was unnecessary for the functionality of the class. This change improves code clarity and removes unnecessary code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…ss specified not to (langflow-ai#2950) * refactor: update StateVertex class to inherit from ComponentVertex The StateVertex class in types.py has been updated to inherit from the ComponentVertex class instead of the Vertex class. This change ensures that the StateVertex class has access to the methods and attributes of the ComponentVertex class, improving code organization and maintainability. * feat: add _successors_ids attribute to Vertex class The Vertex class in base.py has been updated to include a new attribute `_successors_ids`. This attribute will store the IDs of the successors of the vertex. This change improves the functionality and flexibility of the Vertex class. * feat: add _set_successors_ids method to NotifyComponent This commit adds a new method `_set_successors_ids` to the `NotifyComponent` class in `Notify.py`. This method retrieves the successors of the vertex and sets the `successors_ids` attribute accordingly. This change improves the functionality and flexibility of the `NotifyComponent` class. * refactor: add _set_successors_ids method to ListenComponent This commit adds a new method `_set_successors_ids` to the `ListenComponent` class in `Listen.py`. This method retrieves the successors of the vertex and sets the `successors_ids` attribute accordingly. This change improves the functionality and flexibility of the `ListenComponent` class. * refactor: update StateVertex class to not be a state This commit updates the StateVertex class in types.py to no longer be considered a state. The `is_state` attribute is set to False, ensuring that the vertex is not treated as a state. This change improves code clarity and aligns with the intended functionality of the class. * refactor: set is_state attribute to True in ListenComponent This commit sets the `is_state` attribute to True in the `ListenComponent` class in `Listen.py`. This change ensures that the `ListenComponent` is treated as a state and improves the functionality of the component. * refactor: set is_state attribute to True in NotifyComponent * refactor: remove base_type argument from StateVertex constructor This commit removes the `base_type` argument from the constructor of the `StateVertex` class in `types.py`. The `base_type` argument was not being used and was unnecessary for the functionality of the class. This change improves code clarity and removes unnecessary code. --------- Co-authored-by: Lucas Oliveira <[email protected]> (cherry picked from commit d33e498)
This commit adds a new method
_set_successors_ids
to theListenComponent
class inListen.py
. This method retrieves the successors of the vertex and sets thesuccessors_ids
attribute accordingly. This change improves the functionality and flexibility of theListenComponent
class.Fixes #2919