Skip to content

Commit

Permalink
Use union type expression in ExpressionTokenizer.equal
Browse files Browse the repository at this point in the history
Other places already use this syntax so use it to be consistent.

Co-authored-by: Erik Schamper <[email protected]>
  • Loading branch information
d3dave and Schamper committed May 6, 2024
1 parent 0c51b46 commit 0f5b17b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dissect/cstruct/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(self, expression: str):
self.pos = 0
self.tokens = []

def equal(self, token: str, expected: Union[str, set[str]]) -> bool:
def equal(self, token: str, expected: str | set[str]) -> bool:
if isinstance(expected, set):
return token in expected
else:
Expand Down

0 comments on commit 0f5b17b

Please sign in to comment.