cairo-contracts
cairo-contracts copied to clipboard
fix: crash when comparing metrics with None values
updated compare_subdicts and markdown_subtable to safely handle cases where old[file] or new[file] might be None.
using (old.get(file) or {}).get(metric) and (new.get(file) or {}).get(metric) prevents AttributeError and ensures the comparison works reliably.
PR Checklist
- [x] Tests
- [ ] Documentation
- [ ] Added entry to CHANGELOG.md
- [ ] Tried the feature on a public network
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 92.38%. Comparing base (fc94206) to head (0c75053).
Additional details and impacted files
@@ Coverage Diff @@
## main #1529 +/- ##
=======================================
Coverage 92.38% 92.38%
=======================================
Files 82 82
Lines 2272 2272
=======================================
Hits 2099 2099
Misses 173 173
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update fc94206...0c75053. Read the comment docs.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.