mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
[python] Make overlooked PyElementVisitor methods for statements delegate to visitPyStatement
(cherry picked from commit f6853d0dfc5ddcc7b40bfccead0ad779328fc751) IJ-CR-172556 GitOrigin-RevId: b7d424930b1f4752ea69041a4ab53229b0392f5d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6e0f0e5f2a
commit
d5673dceef
@@ -203,11 +203,11 @@ public class PyElementVisitor extends PsiElementVisitor {
|
||||
}
|
||||
|
||||
public void visitPyFunction(@NotNull PyFunction node) {
|
||||
visitPyElement(node);
|
||||
visitPyStatement(node);
|
||||
}
|
||||
|
||||
public void visitPyClass(@NotNull PyClass node) {
|
||||
visitPyElement(node);
|
||||
visitPyStatement(node);
|
||||
}
|
||||
|
||||
public void visitPyFile(@NotNull PyFile node) {
|
||||
@@ -271,7 +271,7 @@ public class PyElementVisitor extends PsiElementVisitor {
|
||||
}
|
||||
|
||||
public void visitPyAssertStatement(@NotNull PyAssertStatement node) {
|
||||
visitPyElement(node);
|
||||
visitPyStatement(node);
|
||||
}
|
||||
|
||||
public void visitPyPassStatement(@NotNull PyPassStatement node) {
|
||||
|
||||
@@ -949,8 +949,10 @@ public class PyControlFlowBuilder extends PyRecursiveElementVisitor {
|
||||
@Override
|
||||
public void visitPyAssertStatement(final @NotNull PyAssertStatement node) {
|
||||
myBuilder.startNode(node);
|
||||
super.visitPyAssertStatement(node);
|
||||
final PyExpression[] args = node.getArguments();
|
||||
for (PyExpression arg : args) {
|
||||
arg.accept(this);
|
||||
}
|
||||
// assert False
|
||||
if (args.length >= 1) {
|
||||
if (!PyEvaluator.evaluateAsBooleanNoResolve(args[0], true)) {
|
||||
|
||||
Reference in New Issue
Block a user