-
Notifications
You must be signed in to change notification settings - Fork 418
New pre-commit hooks for everything in code_style.sh ; make code compliant with these hooks
#1994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New pre-commit hooks for everything in code_style.sh ; make code compliant with these hooks
#1994
Conversation
2105218 to
2581d6c
Compare
2581d6c to
5eb5592
Compare
7d08cc1 to
3701642
Compare
aea9fb7 to
c98c291
Compare
richjames0
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm pending gemini review. it wasn't working so i just removed and re-added the tag. PTAL before submitting
c98c291 to
7f23bac
Compare
…mmit-hooks.yaml,.editorconfig] Init ; [*] Modify code to be compliant with pre-commit hooks
7f23bac to
a9c4867
Compare
NicoGrande
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@richjames0 & @shralex I think I know the reason now. This PR is forked version from |
Description
Many of my contributions have been to improve the overall quality of this codebase through application of automated code-quality tooling. You already have pre-commit hooks; this PR adds everything in your
code_style.shinto it; so no longer will people be able to contribute code so low quality it doesn't pass the automated code-quality checking tooling.Along the way I found and fixed actual errors, like in
MaxText/convert_deepseek_unscanned_ckpt.pywhen the API changed (#1837) and tests didn't pickup the issue but pytype did. Ditto for the requiredMaxText/sft_trainer.pyupdate from #1327. Also some incorrect types being used (ints vsstrings;ints vsnp.ndarray;floats vsnp.ndarray) and add missing__init__.pys so imports work properly (nopytype module-error).EDIT: Following internal team-member request, I wrote and executed this script to split this PR up. Don't close this PR, but merge the linked ones first.
fd --exact-depth 2 -Ftd -j1 -x bash -c 'd=${0:2}; d=${d//\//.}; title="[${d}] pytype + pylint + pyink + codespell"; git switch main && git reset --hard && git checkout -b "qa_${d}" && git checkout auto_check_and_precommit_and_bash_code_style_sh "${0}" && git commit --no-verify -S -am "${title}" && git push mine "qa_${d}" ; gh pr create --title "${title}" --body "$(cat -- /tmp/a.md)"' {//}Tests
N/A
Checklist
Before submitting this PR, please make sure (put X in square brackets):