From 2fbb0f7e1ccf416ffdcc2d318ae8632bbb9d0106 Mon Sep 17 00:00:00 2001 From: Reid 'arrdem' McKenzie Date: Sat, 21 Aug 2021 22:25:47 -0600 Subject: [PATCH] linting --- projects/lilith/src/python/lilith/__main__.py | 7 ++++++- projects/lilith/test/python/test_parser.py | 10 +--------- 2 files changed, 7 insertions(+), 10 deletions(-) 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