Skip to content

Commit

Permalink
Update docstring example
Browse files Browse the repository at this point in the history
  • Loading branch information
edmondchuc committed Sep 25, 2023
1 parent d5fbff9 commit 6c3a2b9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions prez/bnode.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ def get_bnode_depth(node: URIRef, graph: Graph) -> int:
:param node: The starting resource node.
:param graph: The resource's concise bounded description graph.
>>> graph = Graph().parse(...)
>>> depth = get_bnode_depth(URIRef("node-name"), graph)
>>> graph = Graph().parse("example-data.ttl")
>>> resource = URIRef("node-name")
>>> cbd = graph.cbd(resource)
>>> depth = get_bnode_depth(resource, cbd)
"""
max_depth = 0
for obj in graph.objects(node, None):
Expand Down

0 comments on commit 6c3a2b9

Please sign in to comment.