Skip to content

Commit 5801f20

Browse files
committed
update kebab case
1 parent 64254c8 commit 5801f20

7 files changed

+11
-11
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# parse_options: { "target_version": "3.8" }
1+
# parse_options: { "target-version": "3.8" }
22
@buttons[0].clicked.connect
33
def spam(): ...
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# parse_options: { "target_version": "3.9" }
1+
# parse_options: { "target-version": "3.9" }
22
@buttons[0].clicked.connect
33
def spam(): ...
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# parse_options: { "target_version": "3.8" }
1+
# parse_options: { "target-version": "3.8" }
22
@buttons.clicked.connect
33
def spam(): ...
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# parse_options: { "target_version": "3.8" }
1+
# parse_options: { "target-version": "3.8" }
22
@eval("buttons[0].clicked.connect")
33
def spam(): ...
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# parse_options: { "target_version": "3.8" }
1+
# parse_options: { "target-version": "3.8" }
22
def _(x): return x
33
@_(buttons[0].clicked.connect)
44
def spam(): ...

crates/ruff_python_parser/src/parser/statement.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -2579,28 +2579,28 @@ impl<'src> Parser<'src> {
25792579
// or the "eval hack" called out in the PEP.
25802580

25812581
// test_ok decorator_expression_dotted_ident_before_py39
2582-
// # parse_options: { "target_version": "3.8" }
2582+
// # parse_options: { "target-version": "3.8" }
25832583
// @buttons.clicked.connect
25842584
// def spam(): ...
25852585

25862586
// test_ok decorator_expression_identity_hack_before_py39
2587-
// # parse_options: { "target_version": "3.8" }
2587+
// # parse_options: { "target-version": "3.8" }
25882588
// def _(x): return x
25892589
// @_(buttons[0].clicked.connect)
25902590
// def spam(): ...
25912591

25922592
// test_ok decorator_expression_eval_hack_before_py39
2593-
// # parse_options: { "target_version": "3.8" }
2593+
// # parse_options: { "target-version": "3.8" }
25942594
// @eval("buttons[0].clicked.connect")
25952595
// def spam(): ...
25962596

25972597
// test_ok decorator_expression_after_py39
2598-
// # parse_options: { "target_version": "3.9" }
2598+
// # parse_options: { "target-version": "3.9" }
25992599
// @buttons[0].clicked.connect
26002600
// def spam(): ...
26012601

26022602
// test_err decorator_expression_before_py39
2603-
// # parse_options: { "target_version": "3.8" }
2603+
// # parse_options: { "target-version": "3.8" }
26042604
// @buttons[0].clicked.connect
26052605
// def spam(): ...
26062606

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Module(
9494
## Unsupported Syntax Errors
9595

9696
|
97-
1 | # parse_options: { "target_version": "3.8" }
97+
1 | # parse_options: { "target-version": "3.8" }
9898
2 | @buttons[0].clicked.connect
9999
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Syntax Error: Cannot use named expression in decorator on Python 3.8 (syntax was added in Python 3.9)
100100
3 | def spam(): ...

0 commit comments

Comments
 (0)