Skip to content

chore: enable prek compatibility#436

Merged
rpreen merged 1 commit intomainfrom
434-enable-prek
Apr 2, 2026
Merged

chore: enable prek compatibility#436
rpreen merged 1 commit intomainfrom
434-enable-prek

Conversation

@ssrhaso
Copy link
Copy Markdown
Contributor

@ssrhaso ssrhaso commented Apr 2, 2026

Enables prek to run alongside pre-commit

Codespell config:

Updated .pre-commit-config.yaml to pass --toml pyproject.toml to codespell (with tomli dependency), replacing the inline exclude regex. Added skip = ".svg,.ipynb" to [tool.codespell] in pyproject.toml to preserve the same exclusions.

JSON fixes: Replaced 11 bare Infinity values with null across docs/source/attacks/report_example_worstcase.json (10) and report_example_lira.json (1). Aligns with #421 (task I completed prior).

Why pre-commit didn't catch the JSON issue:
Python's json.loads() accepts bare Infinity, -Infinity, and NaN as non-standard extensions. The check-json hook from pre-commit-hooks uses json.loads(), so it silently passes invalid JSON values. prek uses a stricter JSON parser that follows the spec.

Closes #434
@rpreen

@ssrhaso ssrhaso requested a review from rpreen April 2, 2026 10:01
@ssrhaso ssrhaso self-assigned this Apr 2, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.51%. Comparing base (a9524af) to head (25735bb).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #436   +/-   ##
=======================================
  Coverage   99.51%   99.51%           
=======================================
  Files          23       23           
  Lines        2687     2687           
=======================================
  Hits         2674     2674           
  Misses         13       13           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rpreen rpreen changed the title chore: enable prek compatibility (#434) chore: enable prek compatibility Apr 2, 2026
Copy link
Copy Markdown
Contributor

@rpreen rpreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, looks good

@rpreen rpreen merged commit 42041fd into main Apr 2, 2026
4 checks passed
@rpreen rpreen deleted the 434-enable-prek branch April 2, 2026 11:46
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.

[Chore] Enable prek to run as well as pre-commit

2 participants