Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
braised-babbage committed Aug 2, 2024
1 parent 5cedcac commit a38b0f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/openpulse/openpulse/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ def parse_openpulse(
try:
tree = parser.calibrationBlock()
except (RecognitionException, ParseCancellationException) as exc:
msg = ''
msg = ""
# With BailErrorStrategy, we should be able to recover and report
# information about the offending token.
if isinstance(exc, ParseCancellationException) and exc.args:
tok = getattr(exc.args[0], 'offendingToken', None)
tok = getattr(exc.args[0], "offendingToken", None)
if tok is not None:
msg = f"Unexpected token '{tok.text}' at line {tok.line}, column {tok.start}."
raise OpenPulseParsingError(msg) from exc
Expand Down

0 comments on commit a38b0f8

Please sign in to comment.