ruff/crates/ruff_python_formatter/src
Dhruv Manilawala c84c690f1e
Avoid invalid syntax for format-spec with quotes for all Python versions (#14625)
## Summary

fixes: #14608

The logic that was only applied for 3.12+ target version needs to be
applied for other versions as well.

## Test Plan

I've moved the existing test cases for 3.12 only to `f_string.py` so
that it's tested against the default target version.

I think we should probably enabled testing for two target version (pre
3.12 and 3.12) but it won't highlight any issue because the parser
doesn't consider this. Maybe we should enable this once we have target
version specific syntax errors in place
(https://github.com/astral-sh/ruff/issues/6591).
2024-11-27 13:19:33 +05:30
..
comments Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
expression Fix f-string formatting in assignment statement (#14454) 2024-11-26 15:07:18 +05:30
module Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
other Fix f-string formatting in assignment statement (#14454) 2024-11-26 15:07:18 +05:30
pattern Join implicit concatenated strings when they fit on a line (#13663) 2024-10-24 11:52:22 +02:00
snapshots Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
statement Fix f-string formatting in assignment statement (#14454) 2024-11-26 15:07:18 +05:30
string Avoid invalid syntax for format-spec with quotes for all Python versions (#14625) 2024-11-27 13:19:33 +05:30
type_param Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
builders.rs Fix unnecessary space around power op in overlong f-string expressions (#14489) 2024-11-22 13:01:22 +01:00
cli.rs Build CommentRanges outside the parser (#11792) 2024-06-09 09:55:17 +00:00
context.rs Extract LineIndex independent methods from Locator (#13938) 2024-10-28 07:53:41 +00:00
generated.rs Normalize implicit concatenated f-string quotes per part (#13539) 2024-10-08 09:59:17 +00:00
lib.rs Extract LineIndex independent methods from Locator (#13938) 2024-10-28 07:53:41 +00:00
main.rs Formatter and parser refactoring (#7569) 2023-09-26 15:29:43 +02:00
options.rs Change default for Python version from 3.8 to 3.9 (#13896) 2024-11-20 13:11:51 +01:00
prelude.rs Accept any Into<AnyNodeRef> as Comments arguments (#5205) 2023-06-20 16:49:21 +00:00
preview.rs Fix formatting of single with-item with trailing comment (#14005) 2024-11-01 09:08:06 +01:00
range.rs Extract LineIndex independent methods from Locator (#13938) 2024-10-28 07:53:41 +00:00
shared_traits.rs ruff_python_formatter: copy and inline shared traits (#8656) 2023-11-13 12:16:04 -05:00
verbatim.rs Extract LineIndex independent methods from Locator (#13938) 2024-10-28 07:53:41 +00:00