Skip to content

Commit

Permalink
update kebab case
Browse files Browse the repository at this point in the history
  • Loading branch information
ntBre committed Feb 27, 2025
1 parent a757a72 commit 3c98d84
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# parse_options: { "target_version": "3.7" }
# parse_options: { "target-version": "3.7" }
if x := 1: ...
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# parse_options: { "target_version": "3.8" }
# parse_options: { "target-version": "3.8" }
if x := 1: ...
4 changes: 2 additions & 2 deletions crates/ruff_python_parser/src/parser/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2164,11 +2164,11 @@ impl<'src> Parser<'src> {
let range = self.node_range(start);

// test_err walrus_before_py38
// # parse_options: { "target_version": "3.7" }
// # parse_options: { "target-version": "3.7" }
// if x := 1: ...

// test_ok walrus_after_py38
// # parse_options: { "target_version": "3.8" }
// # parse_options: { "target-version": "3.8" }
// if x := 1: ...

if self.options.target_version < PythonVersion::PY38 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Module(
## Unsupported Syntax Errors

|
1 | # parse_options: { "target_version": "3.7" }
1 | # parse_options: { "target-version": "3.7" }
2 | if x := 1: ...
| ^^^^^^ Syntax Error: Cannot use named assignment expression (`:=`) on Python 3.7 (syntax was added in Python 3.8)
|

0 comments on commit 3c98d84

Please sign in to comment.