Skip to content

Skip irrelevant calls in pathlib and comprehension rules - #30036

Open
MichaReiser wants to merge 2 commits into
micha/boxed-comparison-checksfrom
micha/lint-call-shape-checks
Open

MichaReiser wants to merge 2 commits into
micha/boxed-comparison-checksfrom
micha/lint-call-shape-checks

Conversation

@MichaReiser

Copy link
Copy Markdown
Member

Summary

PTH123 checks whether a call resolves to open before looking up file, closefd, or opener. Eight comprehension rules share a check for the constructor name and the kind of its single positional argument, so calls such as len(values) skip those rules entirely.

Test Plan

The Ruff linter test suite passes, and the boxed and flat builds produce the same diagnostics and fixes on the rule fixtures.

@MichaReiser MichaReiser added performance Potential performance improvement linter Related to the Ruff linter labels Nov 4, 2026
@MichaReiser
MichaReiser added this pull request to stack #30037 November 4, 2026 13:31
@MichaReiser
MichaReiser force-pushed the micha/lint-call-shape-checks branch from 52a5575 to a030264 Compare November 4, 2026 17:57
@astral-automations-bot

Copy link
Copy Markdown
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Linter (stable) · Linter (preview)


Results for a030264 · Workflow run

This branch was previously deployed

1 inactive deployment
automations — a030264a Deployed Nov 4, 2026 by MichaReiser via security-review / security review #97196
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linter Related to the Ruff linter performance Potential performance improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant