From ce5bf0be820ddcca1eadac3b22cb48a03b7e7f0d Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Thu, 26 Oct 2023 18:06:36 +0300 Subject: Ignore construct result for mypy compliance This commit addresses the mypy issue below by ignoring the construct result. ``` error: Item "None" of "bytes | str | dict[Any, Any] | Graph | Document | None" has no attribute "serialize" [union-attr] ``` --- gn3/db/rdf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gn3/db') diff --git a/gn3/db/rdf.py b/gn3/db/rdf.py index 017e687..fec5539 100644 --- a/gn3/db/rdf.py +++ b/gn3/db/rdf.py @@ -42,4 +42,4 @@ def sparql_construct_query(query: str, endpoint: str) -> dict: sparql = SPARQLWrapper(endpoint) sparql.setQuery(query) results = sparql.queryAndConvert() - return json.loads(results.serialize(format="json-ld")) + return json.loads(results.serialize(format="json-ld")) # type: ignore -- cgit v1.2.3