diff options
author | Sylvain Thenault <sylvain.thenault@logilab.fr> | 2008-12-03 10:03:36 +0100 |
---|---|---|
committer | Sylvain Thenault <sylvain.thenault@logilab.fr> | 2008-12-03 10:03:36 +0100 |
commit | 6e8a6d0646c9a41e3a0209fbfc6212a9653df364 (patch) | |
tree | 5106a9a44dacf750d0a0316450504a18dee98baf | |
parent | dbb3782eed13cc1c8361f1265a64e113bd4a088b (diff) | |
download | pylint-6e8a6d0646c9a41e3a0209fbfc6212a9653df364.tar.gz |
cleanup / lint fixes
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | MANIFEST.in | 2 | ||||
-rw-r--r-- | checkers/imports.py | 2 | ||||
-rw-r--r-- | checkers/rpython.py | 2 | ||||
-rw-r--r-- | checkers/typecheck.py | 2 | ||||
-rw-r--r-- | utils.py | 6 |
6 files changed, 7 insertions, 8 deletions
@@ -4,6 +4,7 @@ ChangeLog for PyLint -- * include a modified version of Maarten ter Huurne patch of avoid W0613 warning on arguments from overridden method + * add epylint.bat script to fix Windows installation 2008-10-13 -- 0.15.2 * fix #5672: W0706 weirdness ( W0706 removed ) diff --git a/MANIFEST.in b/MANIFEST.in index 302fe08..d446b35 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,10 +4,10 @@ include ChangeLog include TODO include bin/symilar include bin/pylint -include bin/*.bat include bin/pylint-gui include bin/epylint include bin/pyreverse +include bin/*.bat include examples/pylintrc* include examples/*.py include elisp/*.el diff --git a/checkers/imports.py b/checkers/imports.py index 0fc7d86..76b9fa7 100644 --- a/checkers/imports.py +++ b/checkers/imports.py @@ -263,7 +263,7 @@ given file (report R0402 must not be disabled)'} def _module_not_exists(self, node, modname): """check if module exists and possibly add message""" - result, errors = expand_modules([modname], []) + errors = expand_modules([modname], [])[1] if not errors or is_relative(modname, node.root().file): return False error = errors[0] diff --git a/checkers/rpython.py b/checkers/rpython.py index e2239d5..a2553b3 100644 --- a/checkers/rpython.py +++ b/checkers/rpython.py @@ -305,11 +305,9 @@ class RPythonChecker(BaseChecker): """check we are not modifying a module attribute""" if not self._rpython: return - frame = node.frame() if not node.name in node.frame().locals: self.add_message('E1220', node=node, args=(node.name, node.root().name)) - def visit_slice(self, node): """no negative index""" diff --git a/checkers/typecheck.py b/checkers/typecheck.py index cbcbddd..b843f73 100644 --- a/checkers/typecheck.py +++ b/checkers/typecheck.py @@ -129,7 +129,7 @@ accessed.'} except AttributeError: # XXX method / function continue - except astng.NotFoundError, ex: + except astng.NotFoundError: if isinstance(owner, astng.Instance) \ and owner.has_dynamic_getattr(): continue @@ -385,7 +385,7 @@ class ReportsHandlerMixIn: from os.path import dirname, basename, splitext, exists, isdir, join, normpath from logilab.common.modutils import modpath_from_file, get_module_files, \ - file_from_modpath, is_relative + file_from_modpath def expand_modules(files_or_modules, black_list): """take a list of files/modules/packages and return the list of tuple @@ -413,8 +413,8 @@ def expand_modules(files_or_modules, black_list): errors.append( {'key' : 'F0003', 'mod': modname} ) continue except ImportError, ex: - errors.append( {'key': 'F0001', 'mod': modname, 'ex': ex} ) - continue + errors.append( {'key': 'F0001', 'mod': modname, 'ex': ex} ) + continue filepath = normpath(filepath) result.append( {'path': filepath, 'name': modname, 'basepath': filepath, 'basename': modname} ) |