diff options
Diffstat (limited to 'rdflib/namespace/__init__.py')
-rw-r--r-- | rdflib/namespace/__init__.py | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/rdflib/namespace/__init__.py b/rdflib/namespace/__init__.py index 585ecf30..93f692ad 100644 --- a/rdflib/namespace/__init__.py +++ b/rdflib/namespace/__init__.py @@ -488,10 +488,8 @@ class NamespaceManager(object): return ":".join([qNameParts[0], qNameParts[-1]]) def compute_qname(self, uri: str, generate: bool = True) -> Tuple[str, URIRef, str]: - prefix: Optional[str] if uri not in self.__cache: - if not _is_valid_uri(uri): raise ValueError( '"{}" does not look like a valid URI, cannot serialize this. Did you want to urlencode it?'.format( @@ -670,7 +668,6 @@ class NamespaceManager(object): if bound_namespace: bound_namespace = URIRef(bound_namespace) if bound_namespace and bound_namespace != namespace: - if replace: self._store_bind(prefix, namespace, override=override) insert_trie(self.__trie, str(namespace)) |