diff --git a/Makefile b/Makefile index c636f905..cb658432 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ lint: ruff mypy ruff: pip install -U ruff - ruff check tatsu test + ruff check tatsu test examples mypy: diff --git a/examples/calc/calc.py b/examples/calc/calc.py index 32ab6e25..162d3811 100644 --- a/examples/calc/calc.py +++ b/examples/calc/calc.py @@ -1,13 +1,12 @@ -# -*- coding: utf-8 -*- import json from pprint import pprint +from codegen import PostfixCodeGenerator # pylint: disable= E0401 # noqa + import tatsu from tatsu.ast import AST from tatsu.walkers import NodeWalker -from codegen import PostfixCodeGenerator # pylint: disable= E0401 # noqa - def simple_parse(): grammar = open('grammars/calc_cut.ebnf').read() diff --git a/examples/calc/codegen.py b/examples/calc/codegen.py index 1d5d4d21..9b31f071 100644 --- a/examples/calc/codegen.py +++ b/examples/calc/codegen.py @@ -1,9 +1,8 @@ import sys +from tatsu.mixins.indent import IndentPrintMixin from tatsu.model import Node from tatsu.walkers import NodeWalker -from tatsu.mixins.indent import IndentPrintMixin - THIS_MODULE = sys.modules[__name__]