cairo-contracts icon indicating copy to clipboard operation
cairo-contracts copied to clipboard

fix: crash when comparing metrics with None values

Open mdqst opened this issue 3 months ago • 1 comments

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

mdqst avatar Sep 14 '25 14:09 mdqst

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 data Powered 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.

codecov[bot] avatar Sep 14 '25 15:09 codecov[bot]