Skip to content

Commit 5770d02

Browse files
committed
fixing printing of NameConstants
1 parent 2a5dd2c commit 5770d02

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

python/ql/src/semmle/python/PrintAst.qll

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ private module PrettyPrinting {
409409
string getQlClass(AstNode a) {
410410
not exists(getQlCustomClass(a)) and result = a.toString()
411411
or
412-
result = getQlCustomClass(a)
412+
result = strictconcat(getQlCustomClass(a), " | ")
413413
}
414414

415415
/**
@@ -418,7 +418,8 @@ private module PrettyPrinting {
418418
string getQlCustomClass(AstNode a) {
419419
a instanceof Name and
420420
result = "Name" and
421-
not a instanceof Parameter
421+
not a instanceof Parameter and
422+
not a instanceof NameConstant
422423
or
423424
a instanceof Parameter and result = "Parameter"
424425
or

0 commit comments

Comments
 (0)