1
0
Fork 0

use an f string for the error message

This commit is contained in:
Kevin Matz 2022-05-12 19:16:58 -04:00
parent 784f7df603
commit a2146940f7
1 changed files with 1 additions and 1 deletions

View File

@ -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]: