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

Replace Black with Ruff formatter #20445

Merged
merged 1 commit into from
Nov 5, 2024
Merged

Conversation

mwtoews
Copy link
Contributor

@mwtoews mwtoews commented Nov 4, 2024

This PR follows on from #20442 to replace Black with Ruff as the Python code formatter.

Some manual code changes were applied to minimize automated changes or hopefully better represent the logic.

With this transition, examples is not excluded, as there was only a minor change to files in this directory.

Some shell scripts (in shell/) are modified to remove the -e flag, and shell/lint.sh is modified to run and accumulate error codes while running the whole script (i.e. 0=good, 1=one failure, 2=two failures).

@codecov-commenter
Copy link

codecov-commenter commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 82.01%. Comparing base (192b7b2) to head (e2de9e0).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
keras/src/datasets/reuters.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #20445      +/-   ##
==========================================
- Coverage   82.01%   82.01%   -0.01%     
==========================================
  Files         514      514              
  Lines       47192    47194       +2     
  Branches     7408     7408              
==========================================
  Hits        38706    38706              
- Misses       6696     6698       +2     
  Partials     1790     1790              
Flag Coverage Δ
keras 81.87% <0.00%> (-0.01%) ⬇️
keras-jax 64.92% <0.00%> (-0.01%) ⬇️
keras-numpy 59.87% <0.00%> (-0.01%) ⬇️
keras-tensorflow 65.91% <0.00%> (-0.01%) ⬇️
keras-torch 64.87% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Member

@fchollet fchollet left a comment

Choose a reason for hiding this comment

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

LGTM -- thanks!

@google-ml-butler google-ml-butler bot added kokoro:force-run ready to pull Ready to be merged into the codebase labels Nov 4, 2024
@fchollet fchollet merged commit e488c6e into keras-team:master Nov 5, 2024
13 checks passed
@google-ml-butler google-ml-butler bot removed the ready to pull Ready to be merged into the codebase label Nov 5, 2024
@mwtoews mwtoews deleted the ruff-format branch November 5, 2024 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants