Thanks to visit codestin.com
Credit goes to github.com

Skip to content

t-strings (Python 3.14) support for black #4797

@bowiechen

Description

@bowiechen

Describe the bug

black doesn't support Python 3.14 syntax.

To Reproduce

For example, take this code:

name = "world"
print(t"hello {name}")

And run it with these arguments:

$ black file.py --target-version py314

The resulting error is:

error: cannot format t_string.py: Cannot parse for target version Python 3.14: 3:7: print(t"hello {name}")

Expected behavior

I expect black to be able to parse this.

Environment

  • Black's version: 25.9.0
  • OS and Python version: macOS 15.6.1, Python (CPython) 3.13.5

Additional context

None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14Needed to releae with 3.14 support claimed to be completeT: bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions