mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 12:29:28 +00:00
[refurb
] Implement print-empty-string
(FURB105
) (#7617)
## Summary Implement [`simplify-print`](https://github.com/dosisod/refurb/blob/master/refurb/checks/builtin/print.py) as `print-empty-string` (`FURB105`). Extends the original rule in that it also checks for multiple empty string positional arguments with an empty string separator. Related to #1348. ## Test Plan `cargo test`
This commit is contained in:
parent
865c89800e
commit
604cf521b5
8 changed files with 535 additions and 0 deletions
|
@ -914,6 +914,7 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
|
|||
(Flake8Slots, "002") => (RuleGroup::Unspecified, rules::flake8_slots::rules::NoSlotsInNamedtupleSubclass),
|
||||
|
||||
// refurb
|
||||
(Refurb, "105") => (RuleGroup::Preview, rules::refurb::rules::PrintEmptyString),
|
||||
#[allow(deprecated)]
|
||||
(Refurb, "113") => (RuleGroup::Nursery, rules::refurb::rules::RepeatedAppend),
|
||||
#[allow(deprecated)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue