mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 10:48:32 +00:00
[flake8-simplify
] Stabilize split-static-string
(SIM905
) (#16631)
Summary -- Stabilizes SIM905 and adds a small addition to the docs. The test was already in the right place. Test Plan -- No issues except 2 recent, general issues about whitespace normalization.
This commit is contained in:
parent
66cae0a3ec
commit
fce5d892c1
2 changed files with 3 additions and 1 deletions
|
@ -489,7 +489,7 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
|
|||
(Flake8Simplify, "223") => (RuleGroup::Stable, rules::flake8_simplify::rules::ExprAndFalse),
|
||||
(Flake8Simplify, "300") => (RuleGroup::Stable, rules::flake8_simplify::rules::YodaConditions),
|
||||
(Flake8Simplify, "401") => (RuleGroup::Stable, rules::flake8_simplify::rules::IfElseBlockInsteadOfDictGet),
|
||||
(Flake8Simplify, "905") => (RuleGroup::Preview, rules::flake8_simplify::rules::SplitStaticString),
|
||||
(Flake8Simplify, "905") => (RuleGroup::Stable, rules::flake8_simplify::rules::SplitStaticString),
|
||||
(Flake8Simplify, "910") => (RuleGroup::Stable, rules::flake8_simplify::rules::DictGetWithNoneDefault),
|
||||
(Flake8Simplify, "911") => (RuleGroup::Stable, rules::flake8_simplify::rules::ZipDictKeysAndValues),
|
||||
|
||||
|
|
|
@ -39,6 +39,8 @@ use crate::checkers::ast::Checker;
|
|||
/// ).split(",")
|
||||
/// ```
|
||||
///
|
||||
/// as this is converted to `["a", "b"]` without any of the comments.
|
||||
///
|
||||
/// ## References
|
||||
/// - [Python documentation: `str.split`](https://docs.python.org/3/library/stdtypes.html#str.split)
|
||||
#[derive(ViolationMetadata)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue