From 3a160b1418f7c004b16516008cc000a9234933f0 Mon Sep 17 00:00:00 2001 From: Valentin Berlier Date: Mon, 30 Oct 2023 01:12:51 +0100 Subject: [PATCH] fix: update deps --- bolt/module.py | 8 ++++---- bolt/runtime.py | 3 ++- poetry.lock | 16 ++++++++-------- pyproject.toml | 4 ++-- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/bolt/module.py b/bolt/module.py index 06d8318..5a40b2c 100644 --- a/bolt/module.py +++ b/bolt/module.py @@ -34,7 +34,7 @@ cast, ) -from beet import BubbleException, Cache, DataPack, TextFile, TextFileBase +from beet import BubbleException, Cache, DataPack, ResourcePack, TextFile, TextFileBase from beet.core.utils import JsonDict, extra_field, import_from_string, required_field from mecha import ( AstCacheBackend, @@ -152,9 +152,9 @@ class ModuleManager(Mapping[TextFileBase[Any], CompiledModule]): ) globals: JsonDict = extra_field(default_factory=dict) builtins: Set[str] = extra_field(default_factory=set) - prelude: Dict[str, Dict[Optional[DataPack], AstPrelude]] = extra_field( - default_factory=dict - ) + prelude: Dict[ + str, Dict[Optional[Union[ResourcePack, DataPack]], AstPrelude] + ] = extra_field(default_factory=dict) execution_count: int = 0 diff --git a/bolt/runtime.py b/bolt/runtime.py index 4b79d1e..cf4dfce 100644 --- a/bolt/runtime.py +++ b/bolt/runtime.py @@ -20,6 +20,7 @@ CommandTree, CompilationDatabase, Diagnostic, + FileTypeCompilationUnitProvider, Mecha, Visitor, rule, @@ -125,7 +126,7 @@ def __init__(self, ctx: Union[Context, Mecha]): self.spec = mc.spec - mc.providers.append(Module) + mc.providers.append(FileTypeCompilationUnitProvider([Module], mc.directory)) commands_json = files("bolt.resources").joinpath("commands.json").read_text() command_tree = CommandTree.parse_raw(commands_json) diff --git a/poetry.lock b/poetry.lock index 0138ce3..fc5cfdf 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,14 +2,14 @@ [[package]] name = "beet" -version = "0.96.1" +version = "0.97.0" description = "The Minecraft pack development kit" category = "main" optional = false python-versions = ">=3.10,<4.0" files = [ - {file = "beet-0.96.1-py3-none-any.whl", hash = "sha256:cfd9e33c6ef9e4c27b733953dacb78b901dd0bfa21eadedcf69725da544d422d"}, - {file = "beet-0.96.1.tar.gz", hash = "sha256:36fcd594cafc5b725bb9df1be43cec92faf5f958006c02574ccfdbe9b22aac04"}, + {file = "beet-0.97.0-py3-none-any.whl", hash = "sha256:cf493d207ee2fe00a89bed9f47ee88a52d4e7a2150f1e45913d8aed94781c52e"}, + {file = "beet-0.97.0.tar.gz", hash = "sha256:37944afe3856d4757b3448279a3959efaf9c475286bdc0a3c265f32d5d1dd6cf"}, ] [package.dependencies] @@ -706,18 +706,18 @@ files = [ [[package]] name = "mecha" -version = "0.79.0" +version = "0.81.0" description = "A powerful Minecraft command library" category = "main" optional = false python-versions = ">=3.10,<4.0" files = [ - {file = "mecha-0.79.0-py3-none-any.whl", hash = "sha256:601c17c7f203511eebfa2b065c3877a81303685db0a92ac78157d9184c471243"}, - {file = "mecha-0.79.0.tar.gz", hash = "sha256:f12e6de29278aa904de8db3fd535e98f7c5017090ec6d98782475c099bb00131"}, + {file = "mecha-0.81.0-py3-none-any.whl", hash = "sha256:5dffd72fd7f53837295ce8022f91c03c6c58b2b70a30df09ef79fd0f1c1daf48"}, + {file = "mecha-0.81.0.tar.gz", hash = "sha256:1ee8c957f85af7350451970ec4daca23892cd3c347f2feeed013dc3d91c09ca7"}, ] [package.dependencies] -beet = ">=0.96.0" +beet = ">=0.97.0" tokenstream = ">=1.7.0,<2.0.0" [[package]] @@ -1488,4 +1488,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "824c46fcd3900bb6a2c73392a499201e947f3e92cf63eba58ffde182f19b860b" +content-hash = "ce5e3f011fd168149570a1f501dc346e7251ccb352ddc6b84d71506c70392bbc" diff --git a/pyproject.toml b/pyproject.toml index ce02f60..022c5fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,8 +23,8 @@ include = ["bolt/py.typed"] [tool.poetry.dependencies] python = "^3.10" -beet = ">=0.96.1" -mecha = ">=0.79.0" +beet = ">=0.97.0" +mecha = ">=0.81.0" [tool.poetry.group.dev.dependencies] pytest = "^7.4.2"