Skip to content

fix inheritance situation with SPARQLStore, SPARQLUpdateStore, SPARQLConnector and rdflib.store.Store. #2052

@aucampia

Description

@aucampia

SPARQLStore inherits from SPARQLConnector and rdflib.store.Store, however, these two classes have the same methods with different signatures:

class SPARQLStore(SPARQLConnector, Store):

Methods in rdflib.store.Store:

def query(self, query, initNs, initBindings, queryGraph, **kwargs): # noqa: N803

def update(self, update, initNs, initBindings, queryGraph, **kwargs): # noqa: N803

Methods in SPARQLConnector:

def query(self, query, default_graph: str = None, named_graph: str = None):

def update(
self,
query,
default_graph: Optional[str] = None,
named_graph: Optional[str] = None,
):

This situation should be resolved to avoid LSP violations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    LSP-violationLiskov substitution principle violationbreaking changeThis involves or proposes breaking RDFLib's public API.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions