mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-17671 Do not suggest "convert to static" for method if method attribute (pep-0232) is used
This commit is contained in:
@@ -32,6 +32,8 @@ import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* User: ktisha
|
||||
*
|
||||
@@ -73,6 +75,8 @@ public class PyMethodMayBeStaticInspection extends PyInspection {
|
||||
if (node.getModifier() != null) return;
|
||||
final Property property = containingClass.findPropertyByCallable(node);
|
||||
if (property != null) return;
|
||||
final List<PyAssignmentStatement> attributes = node.findAttributes();
|
||||
if (!attributes.isEmpty()) return;
|
||||
|
||||
final PyStatementList statementList = node.getStatementList();
|
||||
final PyStatement[] statements = statementList.getStatements();
|
||||
|
||||
Reference in New Issue
Block a user