PY-81471 Move lang.foldingBuilder to common

GitOrigin-RevId: 3c4f9cc773d14492e9fbf026f0472a908c9262ec
This commit is contained in:
Petr
2025-06-11 18:39:27 +02:00
committed by intellij-monorepo-bot
parent a21d6414d8
commit 685695021f
10 changed files with 71 additions and 64 deletions

View File

@@ -109,7 +109,11 @@ public interface PyFile extends PyAstFile, PyElement, PsiFile, PyDocStringOwner,
/**
* Returns the sequential list of import statements in the beginning of the file.
*/
List<PyImportStatementBase> getImportBlock();
@Override
default List<PyImportStatementBase> getImportBlock() {
//noinspection unchecked
return (List<PyImportStatementBase>)PyAstFile.super.getImportBlock();
}
@Override
default @Nullable PyStringLiteralExpression getDocStringExpression() {

View File

@@ -45,11 +45,6 @@ public interface PyStringLiteralExpression extends PyAstStringLiteralExpression,
int valueOffsetToTextOffset(int valueOffset);
/**
* @return true if this element has single string node and its type is {@link com.jetbrains.python.PyTokenTypes#DOCSTRING}
*/
boolean isDocString();
/**
* Checks whether this literal contains expression fragments. Formatted "f" nodes without any fragments are not considered interpolated.
* <p>