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:
Peter A. Jonsson 2024-03-28 00:31:19 +01:00 committed by GitHub
parent abbefae6f1
commit fc7fa59e5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,7 +21,7 @@ use super::{LogicalLine, Whitespace};
///
/// Use instead:
/// ```python
/// a = 12 + 3
/// a = 4 + 5
/// ```
///
/// [PEP 8]: https://peps.python.org/pep-0008/#whitespace-in-expressions-and-statements
@ -53,7 +53,7 @@ impl AlwaysFixableViolation for TabBeforeOperator {
///
/// Use instead:
/// ```python
/// a = 12 + 3
/// a = 4 + 5
/// ```
///
/// [PEP 8]: https://peps.python.org/pep-0008/#whitespace-in-expressions-and-statements
@ -85,7 +85,7 @@ impl AlwaysFixableViolation for MultipleSpacesBeforeOperator {
///
/// Use instead:
/// ```python
/// a = 12 + 3
/// a = 4 + 5
/// ```
///
/// [PEP 8]: https://peps.python.org/pep-0008/#whitespace-in-expressions-and-statements
@ -117,7 +117,7 @@ impl AlwaysFixableViolation for TabAfterOperator {
///
/// Use instead:
/// ```python
/// a = 12 + 3
/// a = 4 + 5
/// ```
///
/// [PEP 8]: https://peps.python.org/pep-0008/#whitespace-in-expressions-and-statements
@ -148,7 +148,7 @@ impl AlwaysFixableViolation for MultipleSpacesAfterOperator {
///
/// Use instead:
/// ```python
/// a = 4, 3
/// a = 4, 5
/// ```
///
#[violation]