mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
@@ -87,8 +87,6 @@ public class PyDocstringGenerator {
|
||||
for (PyParameter functionParam : function.getParameterList().getParameters()) {
|
||||
String paramName = functionParam.getName();
|
||||
if (!functionParam.isSelf() && !StringUtil.isEmpty(paramName)) {
|
||||
assert paramName != null;
|
||||
|
||||
String type = signature != null ? signature.getArgTypeQualifiedName(paramName) : null;
|
||||
|
||||
if (type != null) {
|
||||
@@ -295,7 +293,7 @@ public class PyDocstringGenerator {
|
||||
if (myDocStringOwner instanceof PyFunction) {
|
||||
final PyStatementList statementList = ((PyFunction)myDocStringOwner).getStatementList();
|
||||
final Document document = PsiDocumentManager.getInstance(myProject).getDocument(getFile());
|
||||
if (document != null && statementList != null && myFunction != null && statementList.getStatements().length != 0
|
||||
if (document != null && myFunction != null && statementList.getStatements().length != 0
|
||||
&& document.getLineNumber(statementList.getTextOffset()) != document.getLineNumber(myFunction.getTextOffset())) {
|
||||
whitespace = PsiTreeUtil.getPrevSiblingOfType(statementList, PsiWhiteSpace.class);
|
||||
}
|
||||
@@ -408,7 +406,7 @@ public class PyDocstringGenerator {
|
||||
final PyStatementList list = myFunction.getStatementList();
|
||||
final Document document = PsiDocumentManager.getInstance(myProject).getDocument(getFile());
|
||||
|
||||
if (document != null && list != null) {
|
||||
if (document != null) {
|
||||
if (document.getLineNumber(list.getTextOffset()) == document.getLineNumber(myFunction.getTextOffset()) ||
|
||||
list.getStatements().length == 0) {
|
||||
PyFunction func = elementGenerator.createFromText(LanguageLevel.forElement(myFunction),
|
||||
|
||||
Reference in New Issue
Block a user