Skip to content

Commit

Permalink
Improve the documentation of E201/E202 (astral-sh#14983)
Browse files Browse the repository at this point in the history
## 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).
  • Loading branch information
DimitriPapadopoulos authored and Glyphack committed Dec 15, 2024
1 parent 3f2e1a6 commit 83b9a61
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 83b9a61

Please sign in to comment.