diff options
author | Nicholas Car <nicholas.car@surroundaustralia.com> | 2020-05-16 21:00:24 +1000 |
---|---|---|
committer | Nicholas Car <nicholas.car@surroundaustralia.com> | 2020-05-16 21:00:24 +1000 |
commit | 0be6f6039479ce29cf71b11e76be54e186130036 (patch) | |
tree | 897d208525a7e8952fb496151db074d49dcdeb3a /rdflib/exceptions.py | |
parent | 2a8d70824e1b4caf0c606074a44ac3a15fa72718 (diff) | |
download | rdflib-0be6f6039479ce29cf71b11e76be54e186130036.tar.gz |
blacked all python files
Diffstat (limited to 'rdflib/exceptions.py')
-rw-r--r-- | rdflib/exceptions.py | 46 |
1 files changed, 32 insertions, 14 deletions
diff --git a/rdflib/exceptions.py b/rdflib/exceptions.py index 85195a53..4e31c0b8 100644 --- a/rdflib/exceptions.py +++ b/rdflib/exceptions.py @@ -2,9 +2,15 @@ TODO: """ -__all__ = ['Error', 'TypeCheckError', 'SubjectTypeError', - 'PredicateTypeError', 'ObjectTypeError', 'ContextTypeError', - 'ParserError'] +__all__ = [ + "Error", + "TypeCheckError", + "SubjectTypeError", + "PredicateTypeError", + "ObjectTypeError", + "ContextTypeError", + "ParserError", +] class Error(Exception): @@ -29,8 +35,10 @@ class SubjectTypeError(TypeCheckError): def __init__(self, node): TypeCheckError.__init__(self, node) - self.msg = "Subject must be instance of URIRef or BNode: %s(%s)" \ - % (self.node, self.type) + self.msg = "Subject must be instance of URIRef or BNode: %s(%s)" % ( + self.node, + self.type, + ) class PredicateTypeError(TypeCheckError): @@ -38,8 +46,10 @@ class PredicateTypeError(TypeCheckError): def __init__(self, node): TypeCheckError.__init__(self, node) - self.msg = "Predicate must be a URIRef instance: %s(%s)" \ - % (self.node, self.type) + self.msg = "Predicate must be a URIRef instance: %s(%s)" % ( + self.node, + self.type, + ) class ObjectTypeError(TypeCheckError): @@ -48,9 +58,11 @@ class ObjectTypeError(TypeCheckError): def __init__(self, node): TypeCheckError.__init__(self, node) - self.msg = "\ -Object must be instance of URIRef, Literal, or BNode: %s(%s)" % \ - (self.node, self.type) + self.msg = ( + "\ +Object must be instance of URIRef, Literal, or BNode: %s(%s)" + % (self.node, self.type) + ) class ContextTypeError(TypeCheckError): @@ -58,8 +70,10 @@ class ContextTypeError(TypeCheckError): def __init__(self, node): TypeCheckError.__init__(self, node) - self.msg = "Context must be instance of URIRef or BNode: %s(%s)" \ - % (self.node, self.type) + self.msg = "Context must be instance of URIRef or BNode: %s(%s)" % ( + self.node, + self.type, + ) class ParserError(Error): @@ -77,5 +91,9 @@ class UniquenessError(Error): """A uniqueness assumption was made in the context, and that is not true""" def __init__(self, values): - Error.__init__(self, "\ -Uniqueness assumption is not fulfilled. Multiple values are: %s" % values) + Error.__init__( + self, + "\ +Uniqueness assumption is not fulfilled. Multiple values are: %s" + % values, + ) |