Skip to content
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

Add pre-commit hook to remove trailing white spaces #2513

Merged

Conversation

cgarciae
Copy link
Collaborator

@cgarciae cgarciae commented Oct 7, 2022

What does this PR do?

  • Adds the trailing-whitespace pre-commit hook.
  • Removes trailing whitespaces from all files in the project.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@cgarciae cgarciae self-assigned this Oct 7, 2022
@codecov-commenter
Copy link

codecov-commenter commented Oct 7, 2022

Codecov Report

Merging #2513 (442df07) into main (ad331b9) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2513   +/-   ##
=======================================
  Coverage   79.09%   79.09%           
=======================================
  Files          49       49           
  Lines        5180     5180           
=======================================
  Hits         4097     4097           
  Misses       1083     1083           
Impacted Files Coverage Δ
flax/core/lift.py 95.88% <ø> (ø)
flax/errors.py 87.20% <ø> (ø)
flax/linen/linear.py 97.50% <ø> (ø)
flax/linen/module.py 92.73% <ø> (ø)
flax/linen/summary.py 99.01% <ø> (ø)
flax/linen/transforms.py 93.90% <ø> (ø)
flax/training/checkpoints.py 61.47% <ø> (ø)
flax/training/early_stopping.py 100.00% <ø> (ø)
flax/training/lr_schedule.py 0.00% <ø> (ø)
flax/traverse_util.py 98.52% <ø> (ø)
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@levskaya levskaya left a comment

Choose a reason for hiding this comment

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

Looks great - you mentioned that the CI actually checks this somehow - but I don't see us modifying any CI configs - does github CI actually look at the .pre-commit-config.yaml file or something?

@cgarciae
Copy link
Collaborator Author

cgarciae commented Oct 7, 2022

@levskaya we have this github action that checks that all pre-commit hooks as specified by pre-commit-config.yaml pass:

- uses: pre-commit/action@v2.0.3

@levskaya
Copy link
Collaborator

levskaya commented Oct 7, 2022

Ah thanks! I was just blind.

@copybara-service copybara-service bot merged commit fe3bf11 into google:main Oct 7, 2022
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.

3 participants