mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 20:41:22 +07:00
PY-79967 Support t-prefixed strings, Related PR: https://github.com/JetBrains/intellij-community/pull/302
* Add PYTHON314_PREFIXES to CompatibilityVisitor * Patch typeshed, add t-string related stubs * Infer `string.templatelib.Template` type for t-strings instead of plain `str` GitOrigin-RevId: 0e913910ab9e0dca4052856b0585ce66265291c0
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a1846f3078
commit
7239d2ef2c
@@ -117,4 +117,14 @@ public interface PyAstStringElement extends PsiElement {
|
||||
* is allowed to have such prefix.
|
||||
*/
|
||||
boolean isFormatted();
|
||||
|
||||
/**
|
||||
* Returns whether this string literal contains "t" or "T" prefix.
|
||||
* <p>
|
||||
* Template strings (t-strings) are a new feature in Python 3.14 for handling
|
||||
* text templates with embedded expressions.
|
||||
*/
|
||||
default boolean isTemplate() {
|
||||
return StringUtil.containsIgnoreCase(getPrefix(), "t");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user