use an f string for the error message
This commit is contained in:
parent
784f7df603
commit
a2146940f7
|
@ -22,7 +22,7 @@ class SyntaxErrorListener(ErrorListener):
|
|||
"""An error listener that raises SyntaxError exceptions."""
|
||||
|
||||
def syntaxError(self, recognizer, offendingSymbol, line, column, msg, e):
|
||||
raise SyntaxError("line {}:{} {}".format(line, column, msg))
|
||||
raise SyntaxError(f"line {line}:{column} {msg}")
|
||||
|
||||
|
||||
def load_config(file: str = 'server.cfg') -> Dict[int, object]:
|
||||
|
|
Loading…
Reference in New Issue