ruff
3592f44a - Allow whitespace around colon in slices for `whitespace-before-punctuation` (`E203`) (#8654)

Commit
1 year ago
Allow whitespace around colon in slices for `whitespace-before-punctuation` (`E203`) (#8654) ## Summary This PR makes `whitespace-before-punctuation` (`E203`) compatible with the formatter by relaxing the rule a bit, as compared to the pycodestyle implementation. It's also more consistent with PEP 8, which says: > However, in a slice the colon acts like a binary operator, and should have equal amounts on either side (treating it as the operator with the lowest priority). Closes https://github.com/astral-sh/ruff/issues/7259. Closes https://github.com/astral-sh/ruff/issues/8642. ## Test Plan `cargo test`
Author
Parents
Loading