-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[ty] Add support for PEP 750 t-strings #20085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Diagnostic diff on typing conformance testsNo changes detected when running ty on typing conformance tests ✅ |
| fn known_class_roundtrip_from_str() { | ||
| let db = setup_db(); | ||
| let mut db = setup_db(); | ||
| Program::get(&db) | ||
| .set_python_version_with_source(&mut db) | ||
| .to(PythonVersionWithSource { | ||
| version: PythonVersion::latest_preview(), | ||
| source: PythonVersionSource::default(), | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if you'd like me to handle this differently, and/or add an assertion to remind us to modify this once the latest supported version is Python 3.14
|
ty] Add support for PEP 750 t-strings
AlexWaygood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
This PR attempts to adds support for inferring`string.templatelib.Template` for t-string literals.
This PR attempts to add support for inferring
string.templatelib.Templatefor t-string literals.First PR of this kind so apologies in advance if I've made a mess of things! Also this is low priority so feel free to ignore.
Diff is relatively small but feel free to review commit-by-commit if it's more convenient.
Also tested LSP:
