mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 22:01:47 +00:00
space_around_operator: use same before/after numbers (#10640)
## Summary The example for tab-after-comma (E242): ```python a = 4,\t5 ``` Use instead: ```python a = 4, 3 ``` is confusing since both the whitespace and the numbers are changed. Change so the examples use the same numbers before/after. ## Test Plan Untested.
This commit is contained in:
parent
abbefae6f1
commit
fc7fa59e5f
1 changed files with 5 additions and 5 deletions
|
@ -21,7 +21,7 @@ use super::{LogicalLine, Whitespace};
|
||||||
///
|
///
|
||||||
/// Use instead:
|
/// Use instead:
|
||||||
/// ```python
|
/// ```python
|
||||||
/// a = 12 + 3
|
/// a = 4 + 5
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// [PEP 8]: https://peps.python.org/pep-0008/#whitespace-in-expressions-and-statements
|
/// [PEP 8]: https://peps.python.org/pep-0008/#whitespace-in-expressions-and-statements
|
||||||
|
@ -53,7 +53,7 @@ impl AlwaysFixableViolation for TabBeforeOperator {
|
||||||
///
|
///
|
||||||
/// Use instead:
|
/// Use instead:
|
||||||
/// ```python
|
/// ```python
|
||||||
/// a = 12 + 3
|
/// a = 4 + 5
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// [PEP 8]: https://peps.python.org/pep-0008/#whitespace-in-expressions-and-statements
|
/// [PEP 8]: https://peps.python.org/pep-0008/#whitespace-in-expressions-and-statements
|
||||||
|
@ -85,7 +85,7 @@ impl AlwaysFixableViolation for MultipleSpacesBeforeOperator {
|
||||||
///
|
///
|
||||||
/// Use instead:
|
/// Use instead:
|
||||||
/// ```python
|
/// ```python
|
||||||
/// a = 12 + 3
|
/// a = 4 + 5
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// [PEP 8]: https://peps.python.org/pep-0008/#whitespace-in-expressions-and-statements
|
/// [PEP 8]: https://peps.python.org/pep-0008/#whitespace-in-expressions-and-statements
|
||||||
|
@ -117,7 +117,7 @@ impl AlwaysFixableViolation for TabAfterOperator {
|
||||||
///
|
///
|
||||||
/// Use instead:
|
/// Use instead:
|
||||||
/// ```python
|
/// ```python
|
||||||
/// a = 12 + 3
|
/// a = 4 + 5
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// [PEP 8]: https://peps.python.org/pep-0008/#whitespace-in-expressions-and-statements
|
/// [PEP 8]: https://peps.python.org/pep-0008/#whitespace-in-expressions-and-statements
|
||||||
|
@ -148,7 +148,7 @@ impl AlwaysFixableViolation for MultipleSpacesAfterOperator {
|
||||||
///
|
///
|
||||||
/// Use instead:
|
/// Use instead:
|
||||||
/// ```python
|
/// ```python
|
||||||
/// a = 4, 3
|
/// a = 4, 5
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
#[violation]
|
#[violation]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue