Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6b7af86

Browse filesBrowse files
committed
docs(query_list): Doc tweaks
1 parent 3e9f614 commit 6b7af86
Copy full SHA for 6b7af86

File tree

Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed

‎src/libvcs/_internal/query_list.py

Copy file name to clipboardExpand all lines: src/libvcs/_internal/query_list.py
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def keygetter(
1717
obj: Mapping[str, Any],
1818
path: str,
1919
) -> Union[None, Any, str, list[str], Mapping[str, str]]:
20-
"""Fetch values in objects and keys, deeply.
20+
"""Fetch values in objects and keys, supported nested data.
2121
2222
**With dictionaries**:
2323
@@ -292,6 +292,8 @@ class QueryList(list[T]):
292292
293293
*Experimental, unstable*.
294294
295+
**With dictionaries**:
296+
295297
>>> query = QueryList(
296298
... [
297299
... {
@@ -319,7 +321,7 @@ class QueryList(list[T]):
319321
>>> query.filter(foods__fruit__in="orange")[0]['city']
320322
'Tampa'
321323
322-
Examples of object lookups:
324+
**With objects**:
323325
324326
>>> from typing import Any
325327
>>> from dataclasses import dataclass, field
@@ -357,7 +359,7 @@ class QueryList(list[T]):
357359
>>> query.filter(foods__fruit__in="banana")[0].city
358360
'Tampa'
359361
360-
Example of deeper object lookups:
362+
**With objects (nested)**:
361363
362364
>>> from typing import Optional
363365
>>> from dataclasses import dataclass, field

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.