Skip to content

Commit

Permalink
Ignore construct result for mypy compliance
Browse files Browse the repository at this point in the history
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]
```
  • Loading branch information
BonfaceKilz committed Oct 26, 2023
1 parent e9dcf12 commit aa292c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gn3/db/rdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit aa292c0

Please sign in to comment.