Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 71826f9

Browse files
author
Juanjo Alvarez
committed
Feedback from review
Renegenerated IfExp integration test
1 parent bd9e6c4 commit 71826f9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

ANNOTATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='If'\]/\*\[@InternalType='Compare'\]/\*\[@InternalType='Compare\.ops'\] | BinaryExpressionOp |
100100
| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='If'\]/\*\[@InternalType='Compare'\]/\*\[@InternalType='Compare\.comparators'\] | BinaryExpressionRight |
101101
| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='If'\]/\*\[@InternalType='Compare'\]/\*\[@internalRole\]\[@internalRole='left'\] | BinaryExpressionLeft |
102-
| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='IfExp'\] | If, Expression, Statement |
102+
| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='IfExp'\] | If, Expression |
103103
| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='IfExp'\]/\*\[@internalRole\]\[@internalRole='body'\] | IfBody |
104104
| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='IfExp'\]/\*\[@internalRole\]\[@internalRole='test'\] | IfCondition |
105105
| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='IfExp'\]/\*\[@internalRole\]\[@internalRole='orelse'\] | IfElse |

driver/normalizer/annotation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ var AnnotationRules = On(Any).Self(
270270
On(HasInternalRole("left")).Roles(BinaryExpressionLeft),
271271
),
272272
),
273-
On(HasInternalType(pyast.IfExp)).Roles(If, Expression, Statement).Children(
273+
On(HasInternalType(pyast.IfExp)).Roles(If, Expression).Children(
274274
// These are used on ifexpressions (a = 1 if x else 2)
275275
On(HasInternalRole("body")).Roles(IfBody),
276276
On(HasInternalRole("test")).Roles(IfCondition),

tests/ifexpression.py.uast

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Module {
4242
. . . . . }
4343
. . . . }
4444
. . . . 1: IfExp {
45-
. . . . . Roles: AssignmentValue,If,Expression,Statement
45+
. . . . . Roles: AssignmentValue,If,Expression
4646
. . . . . StartPosition: {
4747
. . . . . . Offset: 4
4848
. . . . . . Line: 1

0 commit comments

Comments
 (0)