MCPcopy Index your code
hub / github.com/httpie/cli / object_for

Function object_for

httpie/cli/nested_json/interpret.py:60–66  ·  view source on GitHub ↗
(kind: PathAction)

Source from the content-addressed store, hash-verified

58 )
59
60 def object_for(kind: PathAction) -> Any:
61 if kind is PathAction.KEY:
62 return {}
63 elif kind in {PathAction.INDEX, PathAction.APPEND}:
64 return []
65 else:
66 assert_cant_happen()
67
68 for index, (path, next_path) in enumerate(zip(paths, paths[1:])):
69 # If there is no context yet, set it.

Callers 1

interpretFunction · 0.85

Calls 1

assert_cant_happenFunction · 0.90

Tested by

no test coverage detected