Skip to content

Commit 3c98d84

Browse files
committed
update kebab case
1 parent a757a72 commit 3c98d84

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# parse_options: { "target_version": "3.7" }
1+
# parse_options: { "target-version": "3.7" }
22
if x := 1: ...
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# parse_options: { "target_version": "3.8" }
1+
# parse_options: { "target-version": "3.8" }
22
if x := 1: ...

crates/ruff_python_parser/src/parser/expression.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2164,11 +2164,11 @@ impl<'src> Parser<'src> {
21642164
let range = self.node_range(start);
21652165

21662166
// test_err walrus_before_py38
2167-
// # parse_options: { "target_version": "3.7" }
2167+
// # parse_options: { "target-version": "3.7" }
21682168
// if x := 1: ...
21692169

21702170
// test_ok walrus_after_py38
2171-
// # parse_options: { "target_version": "3.8" }
2171+
// # parse_options: { "target-version": "3.8" }
21722172
// if x := 1: ...
21732173

21742174
if self.options.target_version < PythonVersion::PY38 {

crates/ruff_python_parser/tests/snapshots/invalid_syntax@walrus_before_py38.py.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Module(
5454
## Unsupported Syntax Errors
5555

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

0 commit comments

Comments
 (0)