ruff/crates/ruff_linter
Charlie Marsh 3592f44ade
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`
2023-11-13 12:16:13 -05:00
..
resources/test Allow whitespace around colon in slices for whitespace-before-punctuation (E203) (#8654) 2023-11-13 12:16:13 -05:00
src Allow whitespace around colon in slices for whitespace-before-punctuation (E203) (#8654) 2023-11-13 12:16:13 -05:00
Cargo.toml Bump annotate-snippets from 0.9.1 to 0.9.2 (#8646) 2023-11-13 14:55:15 +00:00