Add validate-pyproject lint hook and switch to prek#390
Merged
blink1073 merged 5 commits intoCalysto:mainfrom Mar 17, 2026
Merged
Add validate-pyproject lint hook and switch to prek#390blink1073 merged 5 commits intoCalysto:mainfrom
blink1073 merged 5 commits intoCalysto:mainfrom
Conversation
%%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.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References
Description
Adds
validate-pyprojectas a pre-commit hook andjust lintstep, and switches thepre-commitjustfile recipe to useprekinstead ofpre-commit.Changes
validate-pyprojecthook (v0.25) to.pre-commit-config.yamljust pre-commit validate-pyprojectstep to thelintrecipe injustfilepre-commitjustfile recipe fromuv tool run pre-committouv tool run prekBackwards-incompatible changes
None
Testing
Ran
just lint— all checks passed.AI usage