linting
This commit is contained in:
parent
6c2c9190c9
commit
2fbb0f7e1c
2 changed files with 7 additions and 10 deletions
|
@ -122,6 +122,7 @@ parser.add_argument(
|
||||||
parser.add_argument("-v", "--verbose", action="count", default=0)
|
parser.add_argument("-v", "--verbose", action="count", default=0)
|
||||||
parser.add_argument("file", nargs="?", help="A file to start executing from")
|
parser.add_argument("file", nargs="?", help="A file to start executing from")
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
opts, args = parser.parse_known_args()
|
opts, args = parser.parse_known_args()
|
||||||
|
|
||||||
|
@ -146,7 +147,11 @@ def main():
|
||||||
"""The implementation of the Python lang as an eval type."""
|
"""The implementation of the Python lang as an eval type."""
|
||||||
g = globals().copy()
|
g = globals().copy()
|
||||||
l = {}
|
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)
|
exec(body, g, l)
|
||||||
return l["_escape"]
|
return l["_escape"]
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,6 @@
|
||||||
"""tests covering the Lilith parser."""
|
"""tests covering the Lilith parser."""
|
||||||
|
|
||||||
from lilith.parser import (
|
from lilith.parser import Apply, Args, Block, GRAMMAR, parse_buffer, parser_with_transformer, Symbol
|
||||||
Apply,
|
|
||||||
Args,
|
|
||||||
Block,
|
|
||||||
GRAMMAR,
|
|
||||||
parse_buffer,
|
|
||||||
parser_with_transformer,
|
|
||||||
Symbol,
|
|
||||||
)
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue