Skip to content

Commit

Permalink
feat: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
vberlier committed Dec 2, 2023
1 parent 87082d3 commit fcc4bde
Show file tree
Hide file tree
Showing 6 changed files with 186 additions and 92 deletions.
2 changes: 1 addition & 1 deletion bolt/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


from beet import Context, ListOption, configurable
from pydantic import BaseModel
from pydantic.v1 import BaseModel

from .runtime import Runtime

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pydantic import BaseModel
from pydantic.v1 import BaseModel

class Model(BaseModel, frozen=True):
a: int
Expand Down
9 changes: 5 additions & 4 deletions examples/bolt_patchers/patchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ def process_files(ctx: Context):
resource_location=patcher_name,
):
impl = runtime.modules[patcher].namespace
for file_instance, (_, name) in ctx.select(match=impl["targets"]).items():
result = impl["patch"](name, file_instance.ensure_deserialized())
if result is not None:
file_instance.set_content(result)
for entries in ctx.query(match=impl["targets"]).values():
for name, file_instance in entries:
result = impl["patch"](name, file_instance.ensure_deserialized())
if result is not None:
file_instance.set_content(result)

for pack in [ctx.data, *ctx.data.overlays.values()]:
pack[Patcher].clear()
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from beet import ListOption
from dataclasses import dataclass
from pydantic import BaseModel
from pydantic.v1 import BaseModel

thing: str
thing = "hey"
Expand Down
Loading

0 comments on commit fcc4bde

Please sign in to comment.