From 83b9a612a35495a93115760823ffd5133cd52909 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sun, 15 Dec 2024 16:20:04 +0100 Subject: [PATCH] Improve the documentation of E201/E202 (#14983) ## Summary The summary is misleading, as well as the `whitespace-after-open-bracket` and `whitespace-before-close-bracket` names - it's not only brackets, but also parentheses and braces. Align the documentation with the actual behaviour. Don't change the names, but align the documentation with the behaviour. ## Test Plan No test (documentation). --- .../pycodestyle/rules/logical_lines/extraneous_whitespace.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/extraneous_whitespace.rs b/crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/extraneous_whitespace.rs index 24f6cd90cf13cc..a40931bcf9b5a3 100644 --- a/crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/extraneous_whitespace.rs +++ b/crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/extraneous_whitespace.rs @@ -11,7 +11,7 @@ use crate::checkers::logical_lines::LogicalLinesContext; use super::{LogicalLine, Whitespace}; /// ## What it does -/// Checks for the use of extraneous whitespace after "(". +/// Checks for the use of extraneous whitespace after "(", "[" or "{". /// /// ## Why is this bad? /// [PEP 8] recommends the omission of whitespace in the following cases: @@ -50,7 +50,7 @@ impl AlwaysFixableViolation for WhitespaceAfterOpenBracket { } /// ## What it does -/// Checks for the use of extraneous whitespace before ")". +/// Checks for the use of extraneous whitespace before ")", "]" or "}". /// /// ## Why is this bad? /// [PEP 8] recommends the omission of whitespace in the following cases: