Skip to content

Apply reformatting by hand and with Ruff #1202

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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Apply reformatting by hand and with Ruff #1202

wants to merge 4 commits into from

Conversation

akx
Copy link
Member

@akx akx commented Mar 17, 2025

This PR updates Ruff, configures the target line-length to 95 (strikes a balance between the current line lengths in the repo and readability), and formats babel/.

Some artful # fmt: skips, as well as very minor refactoring was done to keep things more readable.

Tests are unformatted in this PR to prove that there are no functional changes in the babel/ code, so as to make this easy to review.

A future PR will likely reformat tests/ similarly, and enforce formatting in CI.

Copy link

codecov bot commented Mar 18, 2025

Codecov Report

Attention: Patch coverage is 88.73874% with 25 lines in your changes missing coverage. Please review.

Project coverage is 91.79%. Comparing base (2e56a2a) to head (a587a5b).

Files with missing lines Patch % Lines
babel/dates.py 68.75% 10 Missing ⚠️
babel/messages/frontend.py 88.09% 5 Missing ⚠️
babel/messages/checkers.py 60.00% 2 Missing ⚠️
babel/core.py 91.66% 1 Missing ⚠️
babel/localtime/_win32.py 0.00% 1 Missing ⚠️
babel/messages/catalog.py 94.44% 1 Missing ⚠️
babel/messages/extract.py 94.44% 1 Missing ⚠️
babel/messages/pofile.py 93.33% 1 Missing ⚠️
babel/numbers.py 96.15% 1 Missing ⚠️
babel/support.py 93.75% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1202      +/-   ##
==========================================
+ Coverage   91.71%   91.79%   +0.08%     
==========================================
  Files          27       27              
  Lines        4696     4694       -2     
==========================================
+ Hits         4307     4309       +2     
+ Misses        389      385       -4     
Flag Coverage Δ
macos-14-3.10 90.83% <88.73%> (+0.08%) ⬆️
macos-14-3.11 90.77% <88.73%> (+0.08%) ⬆️
macos-14-3.12 90.98% <88.73%> (+0.08%) ⬆️
macos-14-3.13 90.98% <88.73%> (+0.08%) ⬆️
macos-14-3.8 90.70% <88.73%> (+0.08%) ⬆️
macos-14-3.9 90.76% <88.73%> (+0.08%) ⬆️
macos-14-pypy3.10 90.83% <88.73%> (+0.08%) ⬆️
ubuntu-24.04-3.10 90.86% <88.73%> (+0.08%) ⬆️
ubuntu-24.04-3.11 90.79% <88.73%> (+0.08%) ⬆️
ubuntu-24.04-3.12 91.00% <88.73%> (+0.08%) ⬆️
ubuntu-24.04-3.13 91.00% <88.73%> (+0.08%) ⬆️
ubuntu-24.04-3.8 90.72% <88.73%> (+0.08%) ⬆️
ubuntu-24.04-3.9 90.79% <88.73%> (+0.08%) ⬆️
ubuntu-24.04-pypy3.10 90.60% <86.48%> (+0.03%) ⬆️
windows-2022-3.10 90.85% <88.28%> (+0.08%) ⬆️
windows-2022-3.11 90.78% <88.28%> (+0.08%) ⬆️
windows-2022-3.12 91.00% <88.28%> (+0.08%) ⬆️
windows-2022-3.13 91.00% <88.28%> (+0.08%) ⬆️
windows-2022-3.8 90.82% <88.28%> (+0.08%) ⬆️
windows-2022-3.9 90.78% <88.28%> (+0.08%) ⬆️
windows-2022-pypy3.10 90.85% <88.28%> (+0.08%) ⬆️

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.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@akx akx marked this pull request as ready for review March 18, 2025 08:08
@akx akx force-pushed the reruff branch 2 times, most recently from 90b1da3 to c0e3a27 Compare March 19, 2025 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant