This logic returns different representations based on the return format. I think this breaks the abstraction. The reasonable return type in this case would be rdflib's Result.
I think the method's return type should be the same as rdflib's Graph.query():
def convert(self) -> rdflib.query.Result:
so as to align querying in-memory and remote RDF sources. Or maybe the convert method is not required at all and query should return rdflib.query.Result.
This logic returns different representations based on the return format. I think this breaks the abstraction. The reasonable return type in this case would be rdflib's
Result
.I think the method's return type should be the same as rdflib's
Graph.query()
:so as to align querying in-memory and remote RDF sources. Or maybe the
convert
method is not required at all andquery
should returnrdflib.query.Result
.