From bae9710e3bfaa15deb2b4015fe321e1885399d07 Mon Sep 17 00:00:00 2001 From: apalala Date: Fri, 8 Dec 2023 19:52:24 -0400 Subject: [PATCH] [lint] fix warnings --- tatsu/ngcodegen/python.py | 1 - test/grammar/directive_test.py | 2 +- test/grammar/join_test.py | 2 +- test/grammar/keyword_test.py | 2 +- test/grammar/parameter_test.py | 2 +- test/grammar/pattern_test.py | 2 +- test/grammar/syntax_test.py | 2 +- test/zzz_bootstrap/bootstrap_test.py | 2 +- 8 files changed, 7 insertions(+), 8 deletions(-) diff --git a/tatsu/ngcodegen/python.py b/tatsu/ngcodegen/python.py index c4305483..a8a46ac4 100644 --- a/tatsu/ngcodegen/python.py +++ b/tatsu/ngcodegen/python.py @@ -139,7 +139,6 @@ def param_repr(p): if not isinstance(rule.exp, grammars.Choice): self._gen_defines_declaration(rule) - def walk_BasedRule(self, rule: grammars.BasedRule): # FIXME: the following override is to not alter the previous codegen rule.exp = rule.rhs diff --git a/test/grammar/directive_test.py b/test/grammar/directive_test.py index 604d0cea..fe555955 100644 --- a/test/grammar/directive_test.py +++ b/test/grammar/directive_test.py @@ -1,8 +1,8 @@ import pytest import tatsu -from tatsu.codegen import codegen from tatsu.exceptions import FailedParse +from tatsu.ngcodegen import codegen from tatsu.util import trim EXEC = 'exec' diff --git a/test/grammar/join_test.py b/test/grammar/join_test.py index bd851028..f9430b9c 100644 --- a/test/grammar/join_test.py +++ b/test/grammar/join_test.py @@ -1,8 +1,8 @@ import unittest from ast import parse -from tatsu.codegen import codegen from tatsu.exceptions import FailedParse +from tatsu.ngcodegen import codegen from tatsu.tool import compile from tatsu.util import trim diff --git a/test/grammar/keyword_test.py b/test/grammar/keyword_test.py index 2b6ed8bc..4380354f 100644 --- a/test/grammar/keyword_test.py +++ b/test/grammar/keyword_test.py @@ -1,8 +1,8 @@ import unittest from ast import parse -from tatsu.codegen import codegen from tatsu.exceptions import FailedParse +from tatsu.ngcodegen import codegen from tatsu.tool import compile diff --git a/test/grammar/parameter_test.py b/test/grammar/parameter_test.py index a30ac6db..50dc2f6b 100644 --- a/test/grammar/parameter_test.py +++ b/test/grammar/parameter_test.py @@ -1,7 +1,7 @@ import contextlib import unittest -from tatsu.codegen import codegen +from tatsu.ngcodegen import codegen from tatsu.parser import GrammarGenerator from tatsu.tool import compile from tatsu.util import trim diff --git a/test/grammar/pattern_test.py b/test/grammar/pattern_test.py index 9b1de687..91094fad 100644 --- a/test/grammar/pattern_test.py +++ b/test/grammar/pattern_test.py @@ -1,7 +1,7 @@ import unittest -from tatsu.codegen import codegen from tatsu.exceptions import FailedParse +from tatsu.ngcodegen import codegen from tatsu.tool import compile from tatsu.util import trim diff --git a/test/grammar/syntax_test.py b/test/grammar/syntax_test.py index 50b04f40..e647d964 100644 --- a/test/grammar/syntax_test.py +++ b/test/grammar/syntax_test.py @@ -3,8 +3,8 @@ import pytest from tatsu import tool -from tatsu.codegen import codegen from tatsu.exceptions import FailedParse, FailedToken +from tatsu.ngcodegen import codegen from tatsu.parser import EBNFBuffer from tatsu.tool import compile from tatsu.util import trim diff --git a/test/zzz_bootstrap/bootstrap_test.py b/test/zzz_bootstrap/bootstrap_test.py index 1f1ae95b..cf359f01 100644 --- a/test/zzz_bootstrap/bootstrap_test.py +++ b/test/zzz_bootstrap/bootstrap_test.py @@ -9,7 +9,7 @@ from pathlib import Path from tatsu import util -from tatsu.codegen import codegen +from tatsu.ngcodegen import codegen from tatsu.parser import EBNFParser, GrammarGenerator from tatsu.parser_semantics import EBNFGrammarSemantics from tatsu.util import asjson