Skip to content

Exempt CPython-derived files from Ruff 0.16's expanded defaults - #73

Merged
jaraco merged 1 commit into
mainfrom
ruff-cpython-derived
Oct 21, 2026
Merged

jaraco merged 1 commit into
mainfrom
ruff-cpython-derived

Conversation

@jaraco

@jaraco jaraco commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Ruff 0.16 expanded its default rule set (jaraco/skeleton#210). After the latest skeleton merge, the project-local files are fixed on main (460b716), but about 95 violations remain in the two CPython-derived files, backports/configparser/__init__.py and tests/test_configparser.py. Most are UP030/UP031/UP032 (format strings → f-strings), C4 comprehension rewrites, and a few RUF/SIM items.

This PR adds [lint.per-file-ignores] (under # local) for those two files only. The goal is to keep them close to CPython so that merges from the cpython branch stay clean. It also drops two # noqa: C901 directives that are now unused (RUF100).

This needs a maintainer decision. The alternative is to apply the fixes (about 40 safe autofixes plus about 50 manual or unsafe ones) and accept more divergence from upstream, as the earlier delint commits did on a smaller scale. Until one of these lands, main stays red on these two files.

🤖 Generated with Claude Code

Keeps backports/configparser/__init__.py and tests/test_configparser.py
close to upstream to ease merges from the cpython branch. Also drops two
noqa directives that are no longer needed.

Ref jaraco/skeleton#210.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jaraco

jaraco commented Oct 18, 2026

Copy link
Copy Markdown
Owner Author

Let's file an issue with CPython to apply these "fixes" upstream.

@jaraco
jaraco merged commit beeb38f into main Oct 21, 2026
36 checks passed
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