Skip to content

Commit

Permalink
Merge pull request #1707 from anatoly-scherbakov/issue-1699-graph-ign…
Browse files Browse the repository at this point in the history
…ores-quads-from-other-graphs

#1699 Document `Graph` behavior regarding context in constructor docstring
  • Loading branch information
nicholascar authored Feb 9, 2022
2 parents b7b7337 + 021e624 commit 948a856
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion rdflib/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ class Graph(Node):
context, such as true merging/demerging of sub-graphs and
provenance.
Even if used with a context-aware store, Graph will only expose the quads which
belong to the default graph. To access the rest of the data, `ConjunctiveGraph` or
`Dataset` classes can be used instead.
The Graph constructor can take an identifier which identifies the Graph
by name. If none is given, the graph is assigned a BNode for its
identifier.
Expand Down Expand Up @@ -1624,7 +1628,12 @@ def __contains__(self, triple_or_quad):
return True
return False

def add(self, triple_or_quad: Union[Tuple[Node, Node, Node, Optional[Any]], Tuple[Node, Node, Node]]) -> "ConjunctiveGraph":
def add(
self,
triple_or_quad: Union[
Tuple[Node, Node, Node, Optional[Any]], Tuple[Node, Node, Node]
],
) -> "ConjunctiveGraph":
"""
Add a triple or quad to the store.
Expand Down

0 comments on commit 948a856

Please sign in to comment.