From e255949cf2ca5482d998ea45916916c2fe133c75 Mon Sep 17 00:00:00 2001 From: Sven Eberth Date: Thu, 23 Jan 2025 01:04:23 +0100 Subject: [PATCH] revert to bad code style --- src/viur/core/bones/base.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/viur/core/bones/base.py b/src/viur/core/bones/base.py index 94a9e0cc5..01fd939a8 100644 --- a/src/viur/core/bones/base.py +++ b/src/viur/core/bones/base.py @@ -389,7 +389,7 @@ def __setattr__(self, key, value): assignment. """ if not self.isClonedInstance and getSystemInitialized() and key != "isClonedInstance" and not key.startswith( - "_"): + "_"): raise AttributeError("You cannot modify this Skeleton. Grab a copy using .clone() first") super().__setattr__(key, value) @@ -1273,8 +1273,7 @@ def _compute(self, skel: 'viur.core.skeleton.SkeletonInstance', bone_name: str): compute_fn_parameters = inspect.signature(self.compute.fn).parameters compute_fn_args = {} if "skel" in compute_fn_parameters: - from viur.core.skeleton import skeletonByKind, \ - RefSkel # noqa: E402 # import works only here because circular imports + from viur.core.skeleton import skeletonByKind, RefSkel # noqa: E402 # import works only here because circular imports if issubclass(skel.skeletonCls, RefSkel): # we have a ref skel we must load the complete skeleton cloned_skel = skeletonByKind(skel.kindName)()