From b7068c45a73bc70d3f9611c81198f0aa5571c4d9 Mon Sep 17 00:00:00 2001 From: Erez Sh Date: Sun, 9 Aug 2020 12:05:07 +0300 Subject: [PATCH] Tiny fixes. Don't test use_bytes on Python 3.4. --- docs/index.md | 2 +- lark/visitors.py | 2 ++ tests/test_parser.py | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index 1310be2..c72305d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -32,7 +32,7 @@ $ pip install lark-parser * [Philosophy & Design Choices](philosophy.md) -* [Full List of Features](features.md) +* [Features](features.md) * [Examples](https://github.com/lark-parser/lark/tree/master/examples) * [Online IDE](https://lark-parser.github.io/lark/ide/app.html) * Tutorials diff --git a/lark/visitors.py b/lark/visitors.py index 3f80016..6494deb 100644 --- a/lark/visitors.py +++ b/lark/visitors.py @@ -14,6 +14,8 @@ class Discard(Exception): # Transformers class _Decoratable: + "Provides support for decorating methods with @v_args" + @classmethod def _apply_decorator(cls, decorator, **kwargs): mro = getmro(cls) diff --git a/tests/test_parser.py b/tests/test_parser.py index f1e269f..cd3ea4d 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -721,7 +721,8 @@ def _make_parser_test(LEXER, PARSER): """) g.parse('\x01\x02\x03') - @unittest.skipIf(sys.version_info[:2]==(2, 7), "bytes parser isn't perfect in Python2.7, exceptions don't work correctly") + @unittest.skipIf(sys.version_info[0]==2 or sys.version_info[:2]==(3, 4), + "bytes parser isn't perfect in Python2, exceptions don't work correctly") def test_bytes_utf8(self): g = r""" start: BOM? char+