ruff/crates/ruff_python_parser/src
Dylan c5b58187da
Add syntax error when conversion flag does not immediately follow exclamation mark (#18706)
Closes #18671

Note that while this has, I believe, always been invalid syntax, it was
reported as a different syntax error until Python 3.12:

Python 3.11:

```pycon
>>> x = 1
>>> f"{x! s}"
  File "<stdin>", line 1
    f"{x! s}"
             ^
SyntaxError: f-string: invalid conversion character: expected 's', 'r', or 'a'
```

Python 3.12:

```pycon
>>> x = 1
>>> f"{x! s}"
  File "<stdin>", line 1
    f"{x! s}"
        ^^^
SyntaxError: f-string: conversion type must come right after the exclamanation mark
```
2025-06-16 11:44:42 -05:00
..
lexer Implement template strings (#17851) 2025-05-30 15:00:56 -05:00
parser Add syntax error when conversion flag does not immediately follow exclamation mark (#18706) 2025-06-16 11:44:42 -05:00
snapshots [ty] AST garbage collection (#18482) 2025-06-13 08:40:11 -04:00
error.rs Add syntax error when conversion flag does not immediately follow exclamation mark (#18706) 2025-06-16 11:44:42 -05:00
lexer.rs Implement template strings (#17851) 2025-05-30 15:00:56 -05:00
lib.rs [ty] AST garbage collection (#18482) 2025-06-13 08:40:11 -04:00
semantic_errors.rs [ty] AST garbage collection (#18482) 2025-06-13 08:40:11 -04:00
string.rs [ty] AST garbage collection (#18482) 2025-06-13 08:40:11 -04:00
token.rs Implement template strings (#17851) 2025-05-30 15:00:56 -05:00
token_set.rs Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
token_source.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
typing.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00