fix(executor): use math.isclose for float comparison (S1244) #78
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "Claude/backup-script:fix/issue-24-S1244-executor-duration-isclose"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #24
Line 241 of
src/gardien/core/executor.pycompared a float with==, flagged by SonarQubepython:S1244. Replaced withmath.isclose(prod code)with a small
abs_tol=1e-9tolerance, which preserves the original sentinel-defaultsemantic (detecting an unset
duration_sleft at its dataclass default of0.0)while satisfying the linter.
No behavior change for passing inputs; tolerates floating-point representational
drift for edge inputs that should still be considered equal.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.