From f938f6246ed8f5674ab7314ff4c880dfa2c24f96 Mon Sep 17 00:00:00 2001 From: Yichen Yan Date: Tue, 19 Sep 2023 10:30:52 +0800 Subject: [PATCH 1/2] Remove non-standard `__path__` modification. --- lark/load_grammar.py | 1 - tests/test_parser.py | 1 - 2 files changed, 2 deletions(-) diff --git a/lark/load_grammar.py b/lark/load_grammar.py index ce0547769..0bbc523c5 100644 --- a/lark/load_grammar.py +++ b/lark/load_grammar.py @@ -25,7 +25,6 @@ from .visitors import Transformer, Visitor, v_args, Transformer_InPlace, Transformer_NonRecursive inline_args = v_args(inline=True) -__path__ = os.path.dirname(__file__) IMPORT_PATHS = ['grammars'] EXT = '.lark' diff --git a/tests/test_parser.py b/tests/test_parser.py index a7496890c..4d59328f4 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -39,7 +39,6 @@ __all__ = ['TestParsers'] -__path__ = os.path.dirname(__file__) def _read(n, *args): with open(os.path.join(__path__, n), *args) as f: return f.read() From 52126a09c91a9e3812acf4404c3fa5adf6f23f75 Mon Sep 17 00:00:00 2001 From: Erez Shinan Date: Wed, 20 Sep 2023 15:36:57 +0300 Subject: [PATCH 2/2] Tests: Remove unused function --- tests/test_parser.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/test_parser.py b/tests/test_parser.py index 4d59328f4..ccddf6363 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -39,9 +39,6 @@ __all__ = ['TestParsers'] -def _read(n, *args): - with open(os.path.join(__path__, n), *args) as f: - return f.read() class TestParsers(unittest.TestCase): def test_big_list(self):