Skip to content

Commit 4983a71

Browse files
committed
[MINOR]: Address PR Commments
1 parent a00330e commit 4983a71

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

jac-cloud/jac_cloud/tests/simple_graph.jac

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,6 @@ walker get_custom_object {
749749
has object_id: str;
750750

751751
can enter1 with `root entry {
752-
import:py from jac_cloud.core.architype {BaseAnchor}
753752
try {
754753
report &(self.object_id);
755754
} except Exception as e {
@@ -762,7 +761,6 @@ walker update_custom_object {
762761
has object_id: str;
763762

764763
can enter1 with `root entry {
765-
import:py from jac_cloud.core.architype {BaseAnchor}
766764
savable_object = &(self.object_id);
767765
savable_object.parent.child.json["c"] = 3;
768766
savable_object.parent.child.arr.append(3);
@@ -785,6 +783,13 @@ walker delete_custom_object {
785783

786784
can enter1 with `root entry {
787785
import:py from jac_cloud.core.architype {BaseAnchor}
788-
Jac.destroy(BaseAnchor.ref(self.object_id));
786+
Jac.destroy(&(self.object_id));
787+
788+
# This is similar to
789+
#
790+
# Jac.destroy(BaseAnchor.ref(self.object_id));
791+
#
792+
# The only difference is BaseAnchor.ref doesn't
793+
# load the actual object and just use it as reference
789794
}
790795
}

jac/jaclang/plugin/feature.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,6 @@ def create_cmd() -> None:
238238
return plugin_manager.hook.create_cmd()
239239

240240

241-
class JacCallable:
242-
"""Jac Callable Executions."""
243-
244-
@staticmethod
245-
def get_object(id: str) -> Architype | None:
246-
"""Get object given id."""
247-
return plugin_manager.hook.get_object_func()(id=id)
248-
249-
250241
class JacFeature(
251242
JacClassReferences,
252243
JacAccessValidation,
@@ -255,7 +246,6 @@ class JacFeature(
255246
JacWalker,
256247
JacBuiltin,
257248
JacCmd,
258-
JacCallable,
259249
):
260250
"""Jac Feature."""
261251

@@ -274,6 +264,11 @@ def reset_graph(root: Optional[Root] = None) -> int:
274264
"""Purge current or target graph."""
275265
return plugin_manager.hook.reset_graph(root=root)
276266

267+
@staticmethod
268+
def get_object(id: str) -> Architype | None:
269+
"""Get object given id."""
270+
return plugin_manager.hook.get_object_func()(id=id)
271+
277272
@staticmethod
278273
def get_object_func() -> Callable[[str], Architype | None]:
279274
"""Get object given id."""

0 commit comments

Comments
 (0)