Files
ruff/crates/ty_python_semantic/resources/mdtest/t_strings.md
Dylan ef4897f9f3 [ty] Add support for PEP 750 t-strings (#20085)
This PR attempts to adds support for inferring`string.templatelib.Template` for t-string literals.
2025-08-25 18:49:49 +00:00

395 B

Template strings

(NB: black does not support Python 3.14 at the time of this writing)

[environment]
python-version = "3.14"

Template strings, or t-strings, were added in Python 3.14.

They may be specified as literals and are objects of type string.templatelib.Template.

Empty template string

reveal_type(t"")  # revealed: Template