From 83243de93de6b63ab6de3a6b77113416c3eb51d9 Mon Sep 17 00:00:00 2001 From: Vasco Schiavo <115561717+VascoSch92@users.noreply.github.com> Date: Mon, 3 Feb 2025 13:53:36 +0100 Subject: [PATCH] Improve Docs: Pylint subcategories' codes (#15909) --- crates/ruff_dev/src/generate_rules_table.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/ruff_dev/src/generate_rules_table.rs b/crates/ruff_dev/src/generate_rules_table.rs index 1a92a756783f7..9923ed1a848a0 100644 --- a/crates/ruff_dev/src/generate_rules_table.rs +++ b/crates/ruff_dev/src/generate_rules_table.rs @@ -198,7 +198,14 @@ pub(crate) fn generate() -> String { for (opt, rules) in rules_by_upstream_category { if opt.is_some() { let UpstreamCategoryAndPrefix { category, prefix } = opt.unwrap(); - table_out.push_str(&format!("#### {category} ({prefix})")); + match codes_csv.as_str() { + "PL" => { + table_out.push_str(&format!("#### {category} ({codes_csv}{prefix})")); + } + _ => { + table_out.push_str(&format!("#### {category} ({prefix})")); + } + } } table_out.push('\n'); table_out.push('\n');