diff --git a/projects/lilith/src/python/lilith/__main__.py b/projects/lilith/src/python/lilith/__main__.py index b7e4a6f..a0b2acf 100644 --- a/projects/lilith/src/python/lilith/__main__.py +++ b/projects/lilith/src/python/lilith/__main__.py @@ -122,6 +122,7 @@ parser.add_argument( parser.add_argument("-v", "--verbose", action="count", default=0) parser.add_argument("file", nargs="?", help="A file to start executing from") + def main(): opts, args = parser.parse_known_args() @@ -146,7 +147,11 @@ def main(): """The implementation of the Python lang as an eval type.""" g = globals().copy() l = {} - body = f"def _shim():\n" + "\n".join(" " + l for l in body.splitlines()) + "\n\n_escape = _shim()" + body = ( + f"def _shim():\n" + + "\n".join(" " + l for l in body.splitlines()) + + "\n\n_escape = _shim()" + ) exec(body, g, l) return l["_escape"] diff --git a/projects/lilith/test/python/test_parser.py b/projects/lilith/test/python/test_parser.py index 6fa5b51..6bea1cc 100644 --- a/projects/lilith/test/python/test_parser.py +++ b/projects/lilith/test/python/test_parser.py @@ -1,14 +1,6 @@ """tests covering the Lilith parser.""" -from lilith.parser import ( - Apply, - Args, - Block, - GRAMMAR, - parse_buffer, - parser_with_transformer, - Symbol, -) +from lilith.parser import Apply, Args, Block, GRAMMAR, parse_buffer, parser_with_transformer, Symbol import pytest