summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreikeon <devnull@localhost>2010-03-12 20:35:01 +0000
committereikeon <devnull@localhost>2010-03-12 20:35:01 +0000
commit9fc47db37050a4cc9254f4f9a50ae458eeaa89fb (patch)
treee2a002e054c666cea4d8433342161bc0a8f971a5
parent3c7e0e4d61b16497562c4a66f8e1ef26f2955836 (diff)
downloadrdflib-9fc47db37050a4cc9254f4f9a50ae458eeaa89fb.tar.gz
Update issue 123
Fixed a few small pylint issues; more to come.
-rw-r--r--rdflib/__init__.py8
-rw-r--r--rdflib/exceptions.py10
-rwxr-xr-xrun_tests.py2
3 files changed, 13 insertions, 7 deletions
diff --git a/rdflib/__init__.py b/rdflib/__init__.py
index 6387ac30..8d3fc4de 100644
--- a/rdflib/__init__.py
+++ b/rdflib/__init__.py
@@ -53,12 +53,12 @@ __all__ = [
import sys
# generator expressions require 2.4
-assert sys.version_info >= (2,4,0), "rdflib requires Python 2.4 or higher"
+assert sys.version_info >= (2, 4, 0), "rdflib requires Python 2.4 or higher"
del sys
import logging
-_logger = logging.getLogger("rdflib")
-_logger.info("version: %s" % __version__)
+_LOGGER = logging.getLogger("rdflib")
+_LOGGER.info("version: %s" % __version__)
from rdflib.term import URIRef, BNode, Literal, Variable
@@ -72,5 +72,5 @@ from rdflib.namespace import RDF, RDFS, OWL, XSD
from rdflib import plugin
from rdflib import query
-import util
+from rdflib import util
diff --git a/rdflib/exceptions.py b/rdflib/exceptions.py
index e4c93ea5..6c5302f6 100644
--- a/rdflib/exceptions.py
+++ b/rdflib/exceptions.py
@@ -1,3 +1,6 @@
+"""
+TODO:
+"""
class Error(Exception):
"""Base class for rdflib exceptions."""
@@ -36,7 +39,8 @@ class ObjectTypeError(TypeCheckError):
or BNode."""
def __init__(self, node):
TypeCheckError.__init__(self, node)
- self.msg = "Object must be instance of URIRef, Literal, or BNode: %s(%s)" % \
+ self.msg = "\
+Object must be instance of URIRef, Literal, or BNode: %s(%s)" % \
(self.node, self.type)
class ContextTypeError(TypeCheckError):
@@ -49,6 +53,7 @@ class ContextTypeError(TypeCheckError):
class ParserError(Error):
"""RDF Parser error."""
def __init__(self, msg):
+ Error.__init__(self, msg)
self.msg = msg
def __str__(self):
@@ -58,6 +63,7 @@ class ParserError(Error):
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)
diff --git a/run_tests.py b/run_tests.py
index 95e71a9f..f563edd7 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -53,7 +53,7 @@ COVERAGE_EXTRA_ARGS = [
'--cover-inclusive',
]
-DEFAULT_ATTRS = ['!known_issue', '!sparql']
+DEFAULT_ATTRS = [] # ['!known_issue', '!sparql']
DEFAULT_DIRS = ['test', 'rdflib']