Skip to content

all: Upgrade to ruff v0.9.6. #16774

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

Merged
merged 1 commit into from
Feb 25, 2025
Merged

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Feb 18, 2025

Summary

The Python linter and code formatter ruff is run in pre-commit and GitHub Actions. This pull request upgrades from ruff==0.1.3 to the current ruff==0.9.6 changing some configuration for new rules and code formatting stable style 2025.

Testing

Running ruff locally and in pre-commit.

Linting:
Nine Python test files are excluded because ruff considers that they contain Python SyntaxErrors.
% ruff rule PLC0206 # dict-index-missing-items will be enabled in a followup pull request. #16776
% ruff rule PLC1901 # compare-to-empty-string is now disabled by default.

Formatting:
Hex constants were converted to lowercase.
String literals were concatenated if they fit within line-length.
Numerous files merely had a single blank line added near the top of the file as part of the stable style for 2025.

Copy link

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.53%. Comparing base (3f0dd13) to head (dc2fcfc).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #16774   +/-   ##
=======================================
  Coverage   98.53%   98.53%           
=======================================
  Files         169      169           
  Lines       21822    21822           
=======================================
  Hits        21502    21502           
  Misses        320      320           

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

Copy link

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    +0 +0.000% VIRT_RV32

@cclauss cclauss changed the title all: Upgrade to ruff v0.9.6 all: Upgrade to ruff v0.9.6. Feb 18, 2025
Signed-off-by: Christian Clauss <cclauss@me.com>
Copy link
Member

@dpgeorge dpgeorge left a comment

Choose a reason for hiding this comment

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

Thanks for doing this. I've been using newer ruff versions for a while now and getting warnings about the toml settings being outdated, so it's good to have things updated here.

@dpgeorge dpgeorge merged commit dc2fcfc into micropython:master Feb 25, 2025
65 of 66 checks passed
@cclauss cclauss deleted the ruff-v0.9.6 branch February 25, 2025 13:07
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.

2 participants