Fix TOPP parameter handling for zero values#328
Conversation
Changed truthiness check `if v:` to explicit `if v != "" and v is not None:` to properly handle numeric zero values (0, 0.0) which are valid parameters. Previously, setting fragment_bin_offset=0 would skip the value entirely, causing malformed command lines where the next flag was interpreted as the previous parameter's value.
📝 WalkthroughWalkthroughModified parameter value filtering logic in CommandExecutor.py to use explicit checks for empty strings and None instead of generic truthiness evaluation. This allows numeric zero values (0, 0.0) to be included in TOPP command construction while still excluding empty strings and None values. Changes
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Changed truthiness check
if v:to explicitif v != "" and v is not None:to properly handle numeric zero values (0, 0.0) which are valid parameters.Previously, setting fragment_bin_offset=0 would skip the value entirely, causing malformed command lines where the next flag was interpreted as the previous parameter's value.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.