8000 docs(query_list): Clean up keygetter · vcs-python/libvcs@d73d110 · GitHub
[go: up one dir, main page]

Skip to content

Commit d73d110

Browse files
committed
docs(query_list): Clean up keygetter
1 parent 4acf23a commit d73d110

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/libvcs/_internal/query_list.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,12 @@ def keygetter(
1717
obj: Mapping[str, Any],
1818
path: str,
1919
) -> Union[None, Any, str, list[str], Mapping[str, str]]:
20-
"""obj, "foods__breakfast", obj['foods']['breakfast']
20+
"""Fetch values in objects and keys, deeply.
2121
2222
>>> keygetter({ "foods": { "breakfast": "cereal" } }, "foods__breakfast")
2323
'cereal'
2424
>>> keygetter({ "foods": { "breakfast": "cereal" } }, "foods")
2525
{'breakfast': 'cereal'}
26-
2726
"""
2827
try:
2928
sub_fields = path.split("__")

0 commit comments

Comments
 (0)
0