From 1deaee3142df5a33af5de2467f641d9d3a15cdfa Mon Sep 17 00:00:00 2001 From: apalala Date: Wed, 29 Nov 2023 15:36:14 -0400 Subject: [PATCH] [test] solve lint warnings and update unit tests --- tatsu/ngcodegen/objectmodel.py | 2 +- test/grammar/parameter_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tatsu/ngcodegen/objectmodel.py b/tatsu/ngcodegen/objectmodel.py index 73d99201..83d25d80 100644 --- a/tatsu/ngcodegen/objectmodel.py +++ b/tatsu/ngcodegen/objectmodel.py @@ -58,7 +58,7 @@ def __init__(self, parser_name: str = '', base_type: type = objectmodel.Node): def generate_model(self, grammar: grammars.Grammar): base_type = self.base_type - base_type_import = f'from {base_type.__module__} import {base_type.__name__.split('.')[-1]}' + base_type_import = f"from {base_type.__module__} import {base_type.__name__.split('.')[-1]}" self.parser_name = self.parser_name or grammar.name self.print( diff --git a/test/grammar/parameter_test.py b/test/grammar/parameter_test.py index cbef4b1a..a30ac6db 100644 --- a/test/grammar/parameter_test.py +++ b/test/grammar/parameter_test.py @@ -18,7 +18,7 @@ def test_keyword_params(self): g = GrammarGenerator('Keywords') model = g.parse(grammar) code = codegen(model) - self.assertEqual('#!/usr/bin/env python', code.splitlines()[0]) + self.assertEqual('#!/usr/bin/env python3', code.splitlines()[0]) def test_35_only_keyword_params(self): grammar = """