release v1: 65 held-out tasks, 78 bootstrap records, r2e_local adapter, manifest ae94c40b (part 4)
622387b verified Download heldout_pool/RDFLib__rdflib-01de9bbd3a29/solution/patch.diff from Benjamin-eecs/openrsi-commit-runtime-assets: direct link, hf CLI and curl.
- Browser
- Download file 1.3 kB
-
https://huggingface.co/datasets/Benjamin-eecs/openrsi-commit-runtime-assets/resolve/main/heldout_pool/RDFLib__rdflib-01de9bbd3a29/solution/patch.diff
- Command line
-
hf download hf://datasets/Benjamin-eecs/openrsi-commit-runtime-assets/heldout_pool/RDFLib__rdflib-01de9bbd3a29/solution/patch.diff
-
curl -L -o patch.diff https://huggingface.co/datasets/Benjamin-eecs/openrsi-commit-runtime-assets/resolve/main/heldout_pool/RDFLib__rdflib-01de9bbd3a29/solution/patch.diff
1.3 kB
| diff --git a/rdflib/graph.py b/rdflib/graph.py | |
| index 5d739a95..7b7256d0 100644 | |
| --- a/rdflib/graph.py | |
| +++ b/rdflib/graph.py | |
| class Dataset(ConjunctiveGraph): | |
| file: Optional[Union[BinaryIO, TextIO]] = None, | |
| data: Optional[Union[str, bytes]] = None, | |
| **args: Any, | |
| - ) -> Graph: | |
| + ) -> Dataset: | |
| """ | |
| Parse an RDF source adding the resulting triples to the Graph. | |
| diff --git a/rdflib/plugins/sparql/update.py b/rdflib/plugins/sparql/update.py | |
| index a6908393..c9d36564 100644 | |
| --- a/rdflib/plugins/sparql/update.py | |
| +++ b/rdflib/plugins/sparql/update.py | |
| def evalModify(ctx: QueryContext, u: CompValue) -> None: | |
| ctx = ctx.pushGraph(g) | |
| for c in list(res): | |
| - dg = ctx.graph | |
| + # TODO: Make this more intentional and without the weird type checking logic | |
| + # once ConjunctiveGraph is removed and Dataset no longer inherits from | |
| + # Graph. | |
| + dg = ctx.graph if type(ctx.graph) is Graph else ctx.dataset.default_context | |
| if u.delete: | |
| # type error: Unsupported left operand type for - ("None") | |
| # type error: Unsupported operand types for - ("Graph" and "Generator[Tuple[Identifier, Identifier, Identifier], None, None]") | |