mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
Specifically, it may cause shift of the inserted docstring (and the following statement) relative to the rest of the function body thus fragmenting its block structure. CodeInsightUtilCore.forcePsiPostprocessAndRestoreElement() can no longer find PyFunction element at the updated range and, thus, buildAndInsert() returns illegal null value. Now we use the actual indentation of a function's body both when it's larger than what is configured in the code style settings (PyIntentionTest.testTypeInDocstring3) and when it's smaller (PyIntentionTest.testGoogleDocStubCustomIndent) and operate solely on the document's level in case of new docstrings to avoid unwanted postprocess reformatting. I also updated some of the existing test data so that it could reproduce the problem by including more than one statement in a function's body.
12 lines
100 B
Python
12 lines
100 B
Python
def f(x, y):
|
|
"""
|
|
|
|
Args:
|
|
x:
|
|
y:
|
|
|
|
Returns:
|
|
|
|
"""
|
|
z = x ** y
|
|
return z |