From 960e47423c7eef685bf6200fdaa9fc2b4be0f4fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Mon, 25 Mar 2024 20:23:31 +0000 Subject: [PATCH] Put flake8-logging next to the other flake8 plugins in registry (#10587) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary This is just a nitpicky improvement, but I thought it'd be a good opportunity to look at the ruff source. > The rules list in the documentation is generated using the registry order. Currently, flake8-logging is separated from the rest of the flake8 plugins. This patch puts it next to them. https://docs.astral.sh/ruff/rules/ If it makes sense, we could alternatively just sort the linters in https://github.com/astral-sh/ruff/blob/main/crates/ruff_dev/src/generate_rules_table.rs. Signed-off-by: Filipe LaĆ­ns --- crates/ruff_linter/src/registry.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ruff_linter/src/registry.rs b/crates/ruff_linter/src/registry.rs index e156e2900c..3d0ebafcb4 100644 --- a/crates/ruff_linter/src/registry.rs +++ b/crates/ruff_linter/src/registry.rs @@ -115,6 +115,9 @@ pub enum Linter { /// [flake8-import-conventions](https://github.com/joaopalmeiro/flake8-import-conventions) #[prefix = "ICN"] Flake8ImportConventions, + /// [flake8-logging](https://pypi.org/project/flake8-logging/) + #[prefix = "LOG"] + Flake8Logging, /// [flake8-logging-format](https://pypi.org/project/flake8-logging-format/) #[prefix = "G"] Flake8LoggingFormat, @@ -202,9 +205,6 @@ pub enum Linter { /// [refurb](https://pypi.org/project/refurb/) #[prefix = "FURB"] Refurb, - /// [flake8-logging](https://pypi.org/project/flake8-logging/) - #[prefix = "LOG"] - Flake8Logging, /// Ruff-specific rules #[prefix = "RUF"] Ruff,