Skip to content

Commit fe5eca5

Browse files
committed
Stabilize os-symlink (PTH211) (#20229)
Summary -- Rule and test/snapshot updated, the docs look good My one hesitation here is that we could hold off stabilizing the rule until its fix is also ready for stabilization, but this is also the only preview PTH rule, so I think it's okay to stabilize the rule and later (probably in the next minor release) stabilize the fixes together.
1 parent cfb5a20 commit fe5eca5

File tree

3 files changed

+1
-154
lines changed

3 files changed

+1
-154
lines changed

crates/ruff_linter/src/codes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
956956
(Flake8UsePathlib, "207") => (RuleGroup::Stable, rules::flake8_use_pathlib::rules::Glob),
957957
(Flake8UsePathlib, "208") => (RuleGroup::Stable, rules::flake8_use_pathlib::violations::OsListdir),
958958
(Flake8UsePathlib, "210") => (RuleGroup::Stable, rules::flake8_use_pathlib::rules::InvalidPathlibWithSuffix),
959-
(Flake8UsePathlib, "211") => (RuleGroup::Preview, rules::flake8_use_pathlib::rules::OsSymlink),
959+
(Flake8UsePathlib, "211") => (RuleGroup::Stable, rules::flake8_use_pathlib::rules::OsSymlink),
960960

961961
// flake8-logging-format
962962
(Flake8LoggingFormat, "001") => (RuleGroup::Stable, rules::flake8_logging_format::violations::LoggingStringFormat),

crates/ruff_linter/src/rules/flake8_use_pathlib/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ mod tests {
129129
#[test_case(Rule::OsPathGetatime, Path::new("PTH203.py"))]
130130
#[test_case(Rule::OsPathGetmtime, Path::new("PTH204.py"))]
131131
#[test_case(Rule::OsPathGetctime, Path::new("PTH205.py"))]
132-
#[test_case(Rule::OsSymlink, Path::new("PTH211.py"))]
133132
fn preview_flake8_use_pathlib(rule_code: Rule, path: &Path) -> Result<()> {
134133
let snapshot = format!(
135134
"preview__{}_{}",

crates/ruff_linter/src/rules/flake8_use_pathlib/snapshots/ruff_linter__rules__flake8_use_pathlib__tests__preview__PTH211_PTH211.py.snap

Lines changed: 0 additions & 152 deletions
This file was deleted.

0 commit comments

Comments
 (0)