Skip to content
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 true/false response methods to return None #5001

Merged
merged 4 commits into from
Dec 3, 2024

Conversation

Cristhianzl
Copy link
Member

This pull request includes changes to the src/backend/base/langflow/components/logic/conditional_router.py file, specifically modifying the return values of two methods to return None instead of self.message.

Changes to return values:

…turn None instead of self.message when condition is not met to improve code clarity and consistency
@Cristhianzl Cristhianzl self-assigned this Dec 2, 2024
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Dec 2, 2024
@github-actions github-actions bot added the refactor Maintenance tasks and housekeeping label Dec 2, 2024
Copy link
Collaborator

@lucaseduoli lucaseduoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 3, 2024
…stead of an empty string in certain cases to improve consistency and avoid potential errors
…alse_response methods to allow returning either Message or str for better flexibility and compatibility with different response types.
@Cristhianzl Cristhianzl merged commit 5145b74 into main Dec 3, 2024
23 checks passed
@Cristhianzl Cristhianzl deleted the cz/ifelse-return branch December 3, 2024 19:58
mieslep pushed a commit to mieslep/langflow that referenced this pull request Dec 4, 2024
…-ai#5001)

* ♻️ (conditional_router.py): refactor ConditionalRouterComponent to return None instead of self.message when condition is not met to improve code clarity and consistency

* 🐛 (conditional_router.py): fix issue where None was being returned instead of an empty string in certain cases to improve consistency and avoid potential errors

* ♻️ (conditional_router.py): Update return type of true_response and false_response methods to allow returning either Message or str for better flexibility and compatibility with different response types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer refactor Maintenance tasks and housekeeping size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants