MCPcopy Create free account
hub / github.com/cdgriffith/Box / _annotated_box

Function _annotated_box

test/test_audit_sync.py:545–557  ·  view source on GitHub ↗
(cls, options)

Source from the content-addressed store, hash-verified

543
544
545def _annotated_box(cls, options):
546 data = {"Top": 1, "sub": {"k": 2}, "lst": [{"i": 0}, {"i": 1}]}
547 build = {k: v for k, v in options.items() if k != "frozen_box"}
548 b = cls(data, **build)
549 b.set_comment("Top", "top-c", "before")
550 b.set_comment(None, "doc")
551 b.sub.set_comment("k", "k-c")
552 b.lst.set_comment(1, "l1-c")
553 b.lst[0].set_comment("i", "i0-c")
554 b.lst.set_comment(None, "ldoc", "end")
555 if options.get("frozen_box"):
556 b = cls(b, **options)
557 return b
558
559
560def _box_state(b):

Callers 1

test_box_round_tripFunction · 0.85

Calls 3

getMethod · 0.80
itemsMethod · 0.45
set_commentMethod · 0.45

Tested by

no test coverage detected