Skip to content

Commit

Permalink
feat: trigger a calculated property on mutation
Browse files Browse the repository at this point in the history
* chore: review
  • Loading branch information
FabienArcellier committed Aug 1, 2024
1 parent 712389c commit ba448f5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/writer/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import types
import urllib.request
from abc import ABCMeta
from functools import partial, wraps
from multiprocessing.process import BaseProcess
from types import ModuleType
from typing import (
Expand Down Expand Up @@ -92,7 +91,7 @@ def import_failure(rvalue: Any = None):
:param rvalue: the value to return
"""
def decorator(func):
@wraps(func)
@functools.wraps(func)
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
Expand Down Expand Up @@ -704,7 +703,7 @@ def subscribe_mutation(self, path: Union[str, List[str]], handler: Callable[['St
for p in path_list:
state_proxy = self._state_proxy
path_parts = p.split(".")
final_handler = partial(handler, self)
final_handler = functools.partial(handler, self)
for i, path_part in enumerate(path_parts):
if i == len(path_parts) - 1:
local_mutation = MutationSubscription(path_parts[-1], final_handler)
Expand Down

0 comments on commit ba448f5

Please sign in to comment.