Skip to content

Add validate-pyproject lint hook and switch to prek#390

Merged
blink1073 merged 5 commits intoCalysto:mainfrom
blink1073:add-validate-pyproject-lint
Mar 17, 2026
Merged

Add validate-pyproject lint hook and switch to prek#390
blink1073 merged 5 commits intoCalysto:mainfrom
blink1073:add-validate-pyproject-lint

Conversation

@blink1073
Copy link
Copy Markdown
Contributor

References

Description

Adds validate-pyproject as a pre-commit hook and just lint step, and switches the pre-commit justfile recipe to use prek instead of pre-commit.

Changes

  • Add validate-pyproject hook (v0.25) to .pre-commit-config.yaml
  • Add just pre-commit validate-pyproject step to the lint recipe in justfile
  • Switch pre-commit justfile recipe from uv tool run pre-commit to uv tool run prek

Backwards-incompatible changes

None

Testing

Ran just lint — all checks passed.

AI usage

  • Some or all of the content of this PR was generated by AI.
  • The human author has carefully reviewed this PR and run this code.
  • AI tools and models used: Claude Sonnet 4.6

%%shell with the command on the first line (e.g. "%%shell ls path")
parses the command as cell magic *args*, not as the cell body. Since
cell_shell() reads self.code (the body), the command was never executed.
On Linux the test coincidentally passed because the TypeError from the
arg mismatch put the path in a logged error message. On Windows that
error is not logged, so log_text was empty and the assertion failed.

Switching to %shell (line magic) properly calls line_shell("ls", path),
executes the command, and streams output through kernel.Print into the
log that get_log_text() reads.
Windows temp paths contain backslashes followed by letters (e.g.
\AppData), which the % operator misinterprets as format specifiers.
Use an f-string instead.
@blink1073 blink1073 enabled auto-merge (squash) March 17, 2026 12:00
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.79%. Comparing base (c8177ff) to head (8d5f65a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #390   +/-   ##
=======================================
  Coverage   90.79%   90.79%           
=======================================
  Files          51       51           
  Lines        2943     2943           
  Branches      414      414           
=======================================
  Hits         2672     2672           
  Misses        190      190           
  Partials       81       81           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@blink1073 blink1073 merged commit 75b7a84 into Calysto:main Mar 17, 2026
27 checks passed
@blink1073 blink1073 deleted the add-validate-pyproject-lint branch March 17, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant