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

fix: handle empty input/output rules in ModelSpec initialization #79

Merged
merged 5 commits into from
Dec 3, 2024

Conversation

abhiabhijit
Copy link
Contributor

Adds null-coalescing operator to handle cases where input_rules or output_rules
might be None. Previously, this could raise a TypeError when attempting to iterate
over None. The change ensures empty lists are used as a fallback, maintaining
consistent behavior and preventing runtime errors.

  • Before: Could fail if rules were None
  • After: Safely handles None values by defaulting to empty list

@abhiabhijit abhiabhijit merged commit b422ca9 into main Dec 3, 2024
8 checks passed
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.

2 participants