Compare commits

...

2 Commits

Author SHA1 Message Date
Brent Westbrook
77c51f62f4 Stabilize in-empty-collection (RUF060)
Tests look good, just two very small comma changes to the docs
2025-09-04 09:32:41 -04:00
Brent Westbrook
43942c7617 TODO drop this empty commit 2025-09-04 09:12:30 -04:00
3 changed files with 4 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
use std::io::Write;
use std::process::ExitCode;
use clap::Parser;

View File

@@ -1047,7 +1047,7 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
(Ruff, "057") => (RuleGroup::Stable, rules::ruff::rules::UnnecessaryRound),
(Ruff, "058") => (RuleGroup::Stable, rules::ruff::rules::StarmapZip),
(Ruff, "059") => (RuleGroup::Preview, rules::ruff::rules::UnusedUnpackedVariable),
(Ruff, "060") => (RuleGroup::Preview, rules::ruff::rules::InEmptyCollection),
(Ruff, "060") => (RuleGroup::Stable, rules::ruff::rules::InEmptyCollection),
(Ruff, "061") => (RuleGroup::Preview, rules::ruff::rules::LegacyFormPytestRaises),
(Ruff, "063") => (RuleGroup::Preview, rules::ruff::rules::AccessAnnotationsFromClassDict),
(Ruff, "064") => (RuleGroup::Preview, rules::ruff::rules::NonOctalPermissions),

View File

@@ -7,10 +7,10 @@ use crate::Violation;
use crate::checkers::ast::Checker;
/// ## What it does
/// Checks for membership tests on empty collections (such as `list`, `tuple`, `set` or `dict`).
/// Checks for membership tests on empty collections (such as `list`, `tuple`, `set`, or `dict`).
///
/// ## Why is this bad?
/// If the collection is always empty, the check is unnecessary, and can be removed.
/// If the collection is always empty, the check is unnecessary and can be removed.
///
/// ## Example
///