Skip to content

Move pytest-fixture-autouse to restriction - #28219

Merged
ntBre merged 2 commits into
astral-sh:mainfrom
flying-sheep:pa/3rd-party-restrictions
Sep 1, 2026
Merged

ntBre merged 2 commits into
astral-sh:mainfrom
flying-sheep:pa/3rd-party-restrictions

Conversation

@flying-sheep

@flying-sheep flying-sheep commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The restriction category description refers to “language features”. I made the wording more general so it can also apply to 3rd party APIs.

I switched one rule, pytest-fixture-autouse into there, as it bans a feature that is both considered idiomatic and has no replacement, which was pointed out by a pytest maintainer and several users:

The rule has been disabled because it was so contentious, only to later be placed into the pedantic categories with many rules that actually improve most code bases. This puts it in the appropriate category.

Test Plan

I ran all the tests, and grepped the docs grepped for “restriction” and “language feature” to make sure I didn’t miss any spot where the categories are described.

@astral-sh-bot

astral-sh-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@ntBre ntBre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks

@ntBre ntBre changed the title Allow 3rd party rules to be placed into the restriction category Move pytest-fixture-autouse to restriction Sep 1, 2026
@ntBre ntBre added preview Related to preview-mode features rule-selection Related to enabling or disabling rules labels Sep 1, 2026
@ntBre
ntBre merged commit 0a61f8a into astral-sh:main Sep 1, 2026
49 checks passed
@flying-sheep
flying-sheep deleted the pa/3rd-party-restrictions branch September 1, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview Related to preview-mode features rule-selection Related to enabling or disabling rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants