summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compat.py8
-rw-r--r--hg.py2
-rw-r--r--logging_ext.py4
-rw-r--r--pytest.py2
-rw-r--r--setup.py2
-rw-r--r--testlib.py14
-rw-r--r--tree.py3
-rw-r--r--ureports/nodes.py2
8 files changed, 17 insertions, 20 deletions
diff --git a/compat.py b/compat.py
index e197b25..c9c5ff4 100644
--- a/compat.py
+++ b/compat.py
@@ -1,4 +1,4 @@
-# pylint: disable-msg=E0601,W0622,W0611
+# pylint: disable=E0601,W0622,W0611
# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
@@ -18,12 +18,10 @@
# with logilab-common. If not, see <http://www.gnu.org/licenses/>.
"""Wrappers around some builtins introduced in python 2.3, 2.4 and
2.5, making them available in for earlier versions of python.
-
-
-
-
"""
+
from __future__ import generators
+
__docformat__ = "restructuredtext en"
import os
diff --git a/hg.py b/hg.py
index 406c856..17e075f 100644
--- a/hg.py
+++ b/hg.py
@@ -19,6 +19,8 @@
__docformat__ = "restructuredtext en"
+import os
+import sys
import os.path as osp
try:
diff --git a/logging_ext.py b/logging_ext.py
index 972f844..087e08c 100644
--- a/logging_ext.py
+++ b/logging_ext.py
@@ -134,7 +134,7 @@ def get_threshold(debug=False, logthreshold=None):
def get_formatter(logformat=LOG_FORMAT, logdateformat=LOG_DATE_FORMAT):
isatty = hasattr(sys.__stdout__, 'isatty') and sys.__stdout__.isatty()
- if debug and isatty and sys.platform != 'win32':
+ if isatty and sys.platform != 'win32':
fmt = ColorFormatter(logformat, logdateformat)
def col_fact(record):
if 'XXX' in record.message:
@@ -150,7 +150,7 @@ def init_log(debug=False, syslog=False, logthreshold=None, logfile=None,
logformat=LOG_FORMAT, logdateformat=LOG_DATE_FORMAT, fmt=None,
rotation_parameters=None, handler=None):
"""init the log service"""
- logger = getLogger()
+ logger = logging.getLogger()
if handler is None:
handler = get_handler(debug, syslog, logfile, rotation_parameters)
# only addHandler and removeHandler method while I would like a setHandler
diff --git a/pytest.py b/pytest.py
index 53b9d1c..5868dfd 100644
--- a/pytest.py
+++ b/pytest.py
@@ -502,7 +502,7 @@ class DjangoTester(PyTester):
"""walks through current working directory, finds something
which can be considered as a testdir and runs every test there
"""
- for dirname, dirs, _ in os.walk(os.getcwd()):
+ for dirname, dirs, files in os.walk(os.getcwd()):
for skipped in ('CVS', '.svn', '.hg'):
if skipped in dirs:
dirs.remove(skipped)
diff --git a/setup.py b/setup.py
index 905895a..61ac9c8 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# pylint: disable-msg=W0404,W0622,W0704,W0613,W0152
+# pylint: disable=W0404,W0622,W0704,W0613
# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
diff --git a/testlib.py b/testlib.py
index 83b41ee..6cbba42 100644
--- a/testlib.py
+++ b/testlib.py
@@ -40,7 +40,7 @@ If no non-option arguments are present, prefixes used are 'test',
__docformat__ = "restructuredtext en"
# modified copy of some functions from test/regrtest.py from PyXml
# disable camel case warning
-# pylint: disable-msg=C0103
+# pylint: disable=C0103
import sys
import os, os.path as osp
@@ -77,7 +77,7 @@ except ImportError:
pass
test_support = TestSupport()
-# pylint: disable-msg=W0622
+# pylint: disable=W0622
from logilab.common.compat import set, enumerate, any, sorted, InheritableSet
# pylint: enable-msg=W0622
from logilab.common.modutils import load_module_from_name
@@ -1038,7 +1038,7 @@ class TestCase(unittest.TestCase):
@classproperty
@cached
- def datadir(cls): # pylint: disable-msg=E0213
+ def datadir(cls): # pylint: disable=E0213
"""helper attribute holding the standard test's data directory
NOTE: this is a logilab's standard
@@ -1473,10 +1473,10 @@ succeeded test into", osp.join(os.getcwd(),FILE_RESTART)
except ExpatError, ex:
if msg is None:
if hasattr(data, 'readlines'): #file like object
- stream.seek(0)
- lines = stream.readlines()
+ data.seek(0)
+ lines = data.readlines()
else:
- lines =data.splitlines(True)
+ lines = data.splitlines(True)
nb_lines = len(lines)
context_lines = []
@@ -1808,7 +1808,7 @@ class DocTest(TestCase):
"""
skipped = ()
def __call__(self, result=None, runcondition=None, options=None):\
- # pylint: disable-msg=W0613
+ # pylint: disable=W0613
try:
finder = DocTestFinder(skipped=self.skipped)
if sys.version_info >= (2, 4):
diff --git a/tree.py b/tree.py
index 5a73405..ec2d890 100644
--- a/tree.py
+++ b/tree.py
@@ -205,9 +205,6 @@ class Node(object):
else:
return [self]
- def __iter__(self):
- return iter(self.children)
-
def flatten(self, _list=None):
"""
return a list with all the nodes descendant from this node
diff --git a/ureports/nodes.py b/ureports/nodes.py
index 3631aaa..0492f66 100644
--- a/ureports/nodes.py
+++ b/ureports/nodes.py
@@ -116,7 +116,7 @@ class Image(BaseComponent):
* title : the image's optional title
"""
def __init__(self, filename, stream, title=None, **kwargs):
- super(Link, self).__init__(**kwargs)
+ super(Image, self).__init__(**kwargs)
assert filename
assert stream
self.filename = filename