[pyupgrade] Stabilize non-pep646-unpack (UP044) (#16632)
Summary -- Stabilizes UP044, renames the module to match the rule name, and removes the `PreviewMode` from the test settings. Test Plan -- 2 closed issues in November, just after the rule was added, otherwise no issues
This commit is contained in:
@@ -538,7 +538,7 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
|
||||
(Pyupgrade, "041") => (RuleGroup::Stable, rules::pyupgrade::rules::TimeoutErrorAlias),
|
||||
(Pyupgrade, "042") => (RuleGroup::Preview, rules::pyupgrade::rules::ReplaceStrEnum),
|
||||
(Pyupgrade, "043") => (RuleGroup::Stable, rules::pyupgrade::rules::UnnecessaryDefaultTypeArgs),
|
||||
(Pyupgrade, "044") => (RuleGroup::Preview, rules::pyupgrade::rules::NonPEP646Unpack),
|
||||
(Pyupgrade, "044") => (RuleGroup::Stable, rules::pyupgrade::rules::NonPEP646Unpack),
|
||||
(Pyupgrade, "045") => (RuleGroup::Preview, rules::pyupgrade::rules::NonPEP604AnnotationOptional),
|
||||
(Pyupgrade, "046") => (RuleGroup::Preview, rules::pyupgrade::rules::NonPEP695GenericClass),
|
||||
(Pyupgrade, "047") => (RuleGroup::Preview, rules::pyupgrade::rules::NonPEP695GenericFunction),
|
||||
|
||||
@@ -285,7 +285,6 @@ mod tests {
|
||||
let diagnostics = test_path(
|
||||
Path::new("pyupgrade/UP044.py"),
|
||||
&settings::LinterSettings {
|
||||
preview: PreviewMode::Enabled,
|
||||
unresolved_target_version: PythonVersion::PY311,
|
||||
..settings::LinterSettings::for_rule(Rule::NonPEP646Unpack)
|
||||
},
|
||||
|
||||
@@ -11,6 +11,7 @@ pub(crate) use format_literals::*;
|
||||
pub(crate) use lru_cache_with_maxsize_none::*;
|
||||
pub(crate) use lru_cache_without_parameters::*;
|
||||
pub(crate) use native_literals::*;
|
||||
pub(crate) use non_pep646_unpack::*;
|
||||
pub(crate) use open_alias::*;
|
||||
pub(crate) use os_error_alias::*;
|
||||
pub(crate) use outdated_version_block::*;
|
||||
@@ -36,7 +37,6 @@ pub(crate) use unpacked_list_comprehension::*;
|
||||
pub(crate) use use_pep585_annotation::*;
|
||||
pub(crate) use use_pep604_annotation::*;
|
||||
pub(crate) use use_pep604_isinstance::*;
|
||||
pub(crate) use use_pep646_unpack::*;
|
||||
pub(crate) use useless_metaclass_type::*;
|
||||
pub(crate) use useless_object_inheritance::*;
|
||||
pub(crate) use yield_in_for_loop::*;
|
||||
@@ -54,6 +54,7 @@ mod format_literals;
|
||||
mod lru_cache_with_maxsize_none;
|
||||
mod lru_cache_without_parameters;
|
||||
mod native_literals;
|
||||
mod non_pep646_unpack;
|
||||
mod open_alias;
|
||||
mod os_error_alias;
|
||||
mod outdated_version_block;
|
||||
@@ -79,7 +80,6 @@ mod unpacked_list_comprehension;
|
||||
mod use_pep585_annotation;
|
||||
mod use_pep604_annotation;
|
||||
mod use_pep604_isinstance;
|
||||
mod use_pep646_unpack;
|
||||
mod useless_metaclass_type;
|
||||
mod useless_object_inheritance;
|
||||
mod yield_in_for_loop;
|
||||
|
||||
Reference in New Issue
Block a user