Skip to content

Commit 48ece85

Browse files
committed
Remove invalid assert statements
1 parent 5f35d8e commit 48ece85

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/commercetools/testing/predicates.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,7 @@ def expression(self, rbp=0):
153153
return left
154154

155155
def advance(self, identifier=None):
156-
assert self.token is not None
157-
if identifier and self.token.identifier != identifier:
156+
if identifier and self.token and self.token.identifier != identifier:
158157
raise SyntaxError(
159158
"Expected %r, received %r" % (identifier, self.token.identifier)
160159
)
@@ -369,7 +368,7 @@ def nud(self):
369368
return self
370369

371370
def ast(self, context: "Context"):
372-
node = self.first.ast()
371+
node = self.first.ast(context)
373372
node.elts.insert(0, ast.Str(s=self.value))
374373
return node
375374

0 commit comments

Comments
 (0)