Skip to content

Commit 620b844

Browse files
committed
[pyupgrade] Stabilize private-type-parameter (UP049) (#18515)
## Summary Stabilizes the UP049 rule (private-type-parameter) by moving it from Preview to Stable. UP049 detects and fixes the use of private type parameters (those with leading underscores) in PEP 695 generic classes and functions. ## Test plan - Verified that UP049 tests pass: `crates/ruff_linter/src/rules/pyupgrade/mod.rs` - Ran full test suite with `make test` - Confirmed that no test migration was needed as UP049 was already in the main `rules` test function ## Rule documentation https://docs.astral.sh/ruff/rules/private-type-parameter/
1 parent 1f70ceb commit 620b844

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/ruff_linter/src/codes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
552552
(Pyupgrade, "045") => (RuleGroup::Preview, rules::pyupgrade::rules::NonPEP604AnnotationOptional),
553553
(Pyupgrade, "046") => (RuleGroup::Preview, rules::pyupgrade::rules::NonPEP695GenericClass),
554554
(Pyupgrade, "047") => (RuleGroup::Preview, rules::pyupgrade::rules::NonPEP695GenericFunction),
555-
(Pyupgrade, "049") => (RuleGroup::Preview, rules::pyupgrade::rules::PrivateTypeParameter),
555+
(Pyupgrade, "049") => (RuleGroup::Stable, rules::pyupgrade::rules::PrivateTypeParameter),
556556
(Pyupgrade, "050") => (RuleGroup::Preview, rules::pyupgrade::rules::UselessClassMetaclassType),
557557

558558
// pydocstyle

0 commit comments

Comments
 (0)