From 4d09eb775d9542aba368d4dc6fedeb84a19f8411 Mon Sep 17 00:00:00 2001 From: nicholascar Date: Tue, 7 Dec 2021 17:28:19 +1000 Subject: blacked all files --- rdflib/namespace/__init__.py | 4 ++-- rdflib/parser.py | 3 +-- rdflib/plugins/shared/jsonld/util.py | 2 +- rdflib/serializer.py | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/rdflib/namespace/__init__.py b/rdflib/namespace/__init__.py index 68bc1726..0739e372 100644 --- a/rdflib/namespace/__init__.py +++ b/rdflib/namespace/__init__.py @@ -219,7 +219,7 @@ class DefinedNamespaceMeta(type): if item_str.startswith("__"): return super().__contains__(item) if item_str.startswith(str(cls._NS)): - item_str = item_str[len(str(cls._NS)):] + item_str = item_str[len(str(cls._NS)) :] return any( item_str in c.__annotations__ or item_str in c._extras @@ -418,7 +418,7 @@ class NamespaceManager(object): pl_namespace = get_longest_namespace(self.__strie[namespace], uri) if pl_namespace is not None: namespace = pl_namespace - name = uri[len(namespace):] + name = uri[len(namespace) :] namespace = URIRef(namespace) prefix = self.store.prefix(namespace) # warning multiple prefixes problem diff --git a/rdflib/parser.py b/rdflib/parser.py index 2a2875d9..8437a2e7 100644 --- a/rdflib/parser.py +++ b/rdflib/parser.py @@ -341,8 +341,7 @@ def create_input_source( input_source = StringInputSource(data) auto_close = True else: - raise RuntimeError( - f"parse data can only str, or bytes. not: {type(data)}") + raise RuntimeError(f"parse data can only str, or bytes. not: {type(data)}") if input_source is None: raise Exception("could not create InputSource") diff --git a/rdflib/plugins/shared/jsonld/util.py b/rdflib/plugins/shared/jsonld/util.py index 707b9ce2..cf71742f 100644 --- a/rdflib/plugins/shared/jsonld/util.py +++ b/rdflib/plugins/shared/jsonld/util.py @@ -88,4 +88,4 @@ def context_from_urlinputsource(source): if ' rel="http://www.w3.org/ns/json-ld#context"' in link: i, j = link.index("<"), link.index(">") if i > -1 and j > -1: - return urljoin(source.url, link[i + 1: j]) + return urljoin(source.url, link[i + 1 : j]) diff --git a/rdflib/serializer.py b/rdflib/serializer.py index 74f29544..15a91d96 100644 --- a/rdflib/serializer.py +++ b/rdflib/serializer.py @@ -30,7 +30,7 @@ class Serializer: stream: IO[bytes], base: Optional[str] = None, encoding: Optional[str] = None, - **args + **args, ) -> None: """Abstract method""" -- cgit v1.2.1