From 1beedf20f9ede41dd96556ebc4180545b9b0f7ad Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Sun, 22 Jan 2023 04:50:05 +0100 Subject: [PATCH] fix: add_rule.py for --linter ruff --- scripts/add_plugin.py | 2 +- src/registry.rs | 2 +- src/violations.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/add_plugin.py b/scripts/add_plugin.py index 71ff72301256e..c662ba7722f99 100755 --- a/scripts/add_plugin.py +++ b/scripts/add_plugin.py @@ -80,7 +80,7 @@ def main(*, plugin: str, url: str, prefix_code: str) -> None: for line in content.splitlines(): indent = get_indent(line) - if line.strip() == "// Ruff": + if line.strip() == "// ruff": fp.write(f"{indent}// {plugin}") fp.write("\n") diff --git a/src/registry.rs b/src/registry.rs index 979382d326cec..cc76d4c502f70 100644 --- a/src/registry.rs +++ b/src/registry.rs @@ -429,7 +429,7 @@ ruff_macros::define_rule_mapping!( // tryceratops TRY004 => rules::tryceratops::rules::PreferTypeError, TRY300 => rules::tryceratops::rules::TryConsiderElse, - // Ruff + // ruff RUF001 => violations::AmbiguousUnicodeCharacterString, RUF002 => violations::AmbiguousUnicodeCharacterDocstring, RUF003 => violations::AmbiguousUnicodeCharacterComment, diff --git a/src/violations.rs b/src/violations.rs index 5c3cdf00d658f..65b3a9c70fe1e 100644 --- a/src/violations.rs +++ b/src/violations.rs @@ -5051,7 +5051,7 @@ impl Violation for ImplicitNamespacePackage { } } -// Ruff +// ruff define_violation!( pub struct AmbiguousUnicodeCharacterString {