mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 10:48:32 +00:00
[pyupgrade
] Stabilize non-pep695-generic-function
(UP047
) (#18524)
## Summary - Stabilizes UP047 (non-pep695-generic-function) rule by changing it from Preview to Stable ## Test plan - ✅ Rule is already tested in main test function, no migration needed - ✅ `make check` passes - ✅ `make test` passes ## Rule Documentation - [Test file](https://github.com/astral-sh/ruff/blob/main/crates/ruff_linter/src/rules/pyupgrade/mod.rs#L111) - [Rule documentation](https://docs.astral.sh/ruff/rules/non-pep695-generic-function/)
This commit is contained in:
parent
6754e94abc
commit
50f84808bc
2 changed files with 3 additions and 2 deletions
|
@ -551,7 +551,7 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
|
|||
(Pyupgrade, "044") => (RuleGroup::Stable, rules::pyupgrade::rules::NonPEP646Unpack),
|
||||
(Pyupgrade, "045") => (RuleGroup::Stable, rules::pyupgrade::rules::NonPEP604AnnotationOptional),
|
||||
(Pyupgrade, "046") => (RuleGroup::Stable, rules::pyupgrade::rules::NonPEP695GenericClass),
|
||||
(Pyupgrade, "047") => (RuleGroup::Preview, rules::pyupgrade::rules::NonPEP695GenericFunction),
|
||||
(Pyupgrade, "047") => (RuleGroup::Stable, rules::pyupgrade::rules::NonPEP695GenericFunction),
|
||||
(Pyupgrade, "049") => (RuleGroup::Stable, rules::pyupgrade::rules::PrivateTypeParameter),
|
||||
(Pyupgrade, "050") => (RuleGroup::Preview, rules::pyupgrade::rules::UselessClassMetaclassType),
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ use super::{DisplayTypeVars, TypeVarReferenceVisitor, check_type_vars, in_nested
|
|||
/// in Python 3.13.
|
||||
///
|
||||
/// Not all type checkers fully support PEP 695 yet, so even valid fixes suggested by this rule may
|
||||
/// cause type checking to fail.
|
||||
/// cause type checking to [fail].
|
||||
///
|
||||
/// ## Fix safety
|
||||
///
|
||||
|
@ -76,6 +76,7 @@ use super::{DisplayTypeVars, TypeVarReferenceVisitor, check_type_vars, in_nested
|
|||
/// [PYI018]: https://docs.astral.sh/ruff/rules/unused-private-type-var/
|
||||
/// [UP046]: https://docs.astral.sh/ruff/rules/non-pep695-generic-class/
|
||||
/// [UP049]: https://docs.astral.sh/ruff/rules/private-type-parameter/
|
||||
/// [fail]: https://github.com/python/mypy/issues/18507
|
||||
#[derive(ViolationMetadata)]
|
||||
pub(crate) struct NonPEP695GenericFunction {
|
||||
name: String,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue