diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..c59580f --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,3 @@ +include ziffers/* +include ziffers/spec/* +global-include *.lark diff --git a/pyproject.toml b/pyproject.toml index bd57430..f70b3f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,21 @@ documentation = "https://github.com/Bubobubobubobubo/ziffers-python" repository = "https://github.com/Bubobubobubobubo/ziffers-python" [tool.black] -line-length = 88 -target_version = ['py310'] +target_version = ['py311'] include = '\.pyi?$' +exclude = ''' +( + /( + \.eggs # exclude a few common directories in the + | \.git # root of the project + | \.hg + | \.mypy_cache + | \.tox + | \.venv + | _build + | buck-out + | build + | dist + )/ +) +''' diff --git a/ziffers/__init__.py b/ziffers/__init__.py index 36bf3c6..b8243f4 100644 --- a/ziffers/__init__.py +++ b/ziffers/__init__.py @@ -5,3 +5,4 @@ from .common import * from .defaults import * from .scale import * from .converters import * +from .spec import * diff --git a/ziffers/parser.py b/ziffers/parser.py index 1b83122..d185d13 100644 --- a/ziffers/parser.py +++ b/ziffers/parser.py @@ -6,10 +6,11 @@ from .mapper import ZiffersTransformer grammar_path = Path(__file__).parent -grammar = grammar_path / "ziffers.lark" +grammar_folder = Path.joinpath(grammar_path, "spec") +grammar_file = Path.joinpath(grammar_folder, "ziffers.lark") ziffers_parser = Lark.open( - grammar, + str(grammar_file), rel_to=__file__, start="root", parser="lalr", diff --git a/ziffers/spec/__init__.py b/ziffers/spec/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ziffers/ziffers.lark b/ziffers/spec/ziffers.lark similarity index 100% rename from ziffers/ziffers.lark rename to ziffers/spec/ziffers.lark