-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd67261
commit 18b88c4
Showing
3 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
.../ruff_python_formatter/resources/test/fixtures/ruff/expression/fstring_py312.options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[ | ||
{ | ||
"target_version": "py312" | ||
} | ||
] |
6 changes: 6 additions & 0 deletions
6
crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/fstring_py312.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# This file contains test cases only for cases where the logic tests for whether | ||
# the target version is 3.12 or later. A user can have 3.12 syntax even if the target | ||
# version isn't set. | ||
|
||
# Quotes re-use | ||
f"{'a'}" |
54 changes: 54 additions & 0 deletions
54
crates/ruff_python_formatter/tests/snapshots/format@expression__fstring_py312.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
source: crates/ruff_python_formatter/tests/fixtures.rs | ||
input_file: crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/fstring_py312.py | ||
--- | ||
## Input | ||
```python | ||
# This file contains test cases only for cases where the logic tests for whether | ||
# the target version is 3.12 or later. A user can have 3.12 syntax even if the target | ||
# version isn't set. | ||
# Quotes re-use | ||
f"{'a'}" | ||
``` | ||
|
||
## Outputs | ||
### Output 1 | ||
``` | ||
indent-style = space | ||
line-width = 88 | ||
indent-width = 4 | ||
quote-style = Double | ||
line-ending = LineFeed | ||
magic-trailing-comma = Respect | ||
docstring-code = Disabled | ||
docstring-code-line-width = "dynamic" | ||
preview = Disabled | ||
target_version = Py312 | ||
source_type = Python | ||
``` | ||
|
||
```python | ||
# This file contains test cases only for cases where the logic tests for whether | ||
# the target version is 3.12 or later. A user can have 3.12 syntax even if the target | ||
# version isn't set. | ||
# Quotes re-use | ||
f"{'a'}" | ||
``` | ||
|
||
|
||
#### Preview changes | ||
```diff | ||
--- Stable | ||
+++ Preview | ||
@@ -3,4 +3,4 @@ | ||
# version isn't set. | ||
# Quotes re-use | ||
-f"{'a'}" | ||
+f"{"a"}" | ||
``` | ||
|
||
|
||
|