Skip to content

Commit

Permalink
revert to bad code style
Browse files Browse the repository at this point in the history
  • Loading branch information
sveneberth committed Jan 23, 2025
1 parent 680e006 commit e255949
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/viur/core/bones/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)()
Expand Down

0 comments on commit e255949

Please sign in to comment.