diff options
Diffstat (limited to 'bsfs')
-rw-r--r-- | bsfs/triple_store/base.py | 7 | ||||
-rw-r--r-- | bsfs/triple_store/sparql.py | 10 |
2 files changed, 6 insertions, 11 deletions
diff --git a/bsfs/triple_store/base.py b/bsfs/triple_store/base.py index a2668c3..942a16b 100644 --- a/bsfs/triple_store/base.py +++ b/bsfs/triple_store/base.py @@ -54,11 +54,7 @@ class TripleStoreBase(abc.ABC): @classmethod @abc.abstractmethod - def Open( - cls, - uri: str, - **kwargs: typing.Any, - ) -> 'TripleStoreBase': + def Open(cls, **kwargs: typing.Any) -> 'TripleStoreBase': # pylint: disable=invalid-name # capitalized classmethod """Return a TripleStoreBase instance connected to *uri*.""" @abc.abstractmethod @@ -75,6 +71,7 @@ class TripleStoreBase(abc.ABC): """Return the store's local schema.""" @schema.setter + @abc.abstractmethod def schema(self, schema: _schema.Schema): """Migrate to new schema by adding or removing class definitions. diff --git a/bsfs/triple_store/sparql.py b/bsfs/triple_store/sparql.py index d9ed55a..fc161b3 100644 --- a/bsfs/triple_store/sparql.py +++ b/bsfs/triple_store/sparql.py @@ -72,13 +72,11 @@ class SparqlStore(base.TripleStoreBase): self._transaction = _Transaction(self._graph) self._schema = bsc.Schema.Empty() + # NOTE: mypy and pylint complain about the **kwargs not being listed (contrasting super) + # However, not having it here is clearer since it's explicit that there are no arguments. @classmethod - def Open( - cls, - uri: str, - **kwargs: typing.Any, - ) -> 'SparqlStore': - return cls(None) + def Open(cls) -> 'SparqlStore': # type: ignore [override] # pylint: disable=arguments-differ + return cls() def commit(self): self._transaction.commit() |