Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid E275 if keyword is followed by a semicolon #12095

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions crates/ruff_linter/resources/test/fixtures/pycodestyle/E27.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,6 @@ def f():
match(foo):
case(1):
pass

# https://github.com/astral-sh/ruff/issues/12094
pass;
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ pub(crate) fn missing_whitespace_after_keyword(
|| matches!(
tok1_kind,
TokenKind::Colon
| TokenKind::Semi
| TokenKind::Newline
| TokenKind::NonLogicalNewline
// In the event of a syntax error, do not attempt to add a whitespace.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ E27.py:77:1: E275 [*] Missing whitespace after keyword
77 |+match (foo):
78 78 | case(1):
79 79 | pass
80 80 |

E27.py:78:5: E275 [*] Missing whitespace after keyword
|
Expand All @@ -142,3 +143,5 @@ E27.py:78:5: E275 [*] Missing whitespace after keyword
78 |- case(1):
78 |+ case (1):
79 79 | pass
80 80 |
81 81 | # https://github.com/astral-sh/ruff/issues/12094
Loading