diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2015-08-25 21:14:04 +0300 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2015-08-25 21:14:04 +0300 |
commit | 90755257e2a2c1a9b45b1a7e5470eef760fe6a90 (patch) | |
tree | d004de703f79460578795dd3fa98ce0adf64b4a4 /pylint | |
parent | 5c8afd6b7472767e4fa4ab7d97b51a9afb80d3b2 (diff) | |
download | pylint-90755257e2a2c1a9b45b1a7e5470eef760fe6a90.tar.gz |
Remove trailing whitespaces and other pylint related issues.
Diffstat (limited to 'pylint')
-rw-r--r-- | pylint/checkers/base.py | 2 | ||||
-rw-r--r-- | pylint/checkers/variables.py | 10 | ||||
-rw-r--r-- | pylint/pyreverse/vcgutils.py | 2 | ||||
-rw-r--r-- | pylint/utils.py | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/pylint/checkers/base.py b/pylint/checkers/base.py index b9387b4..f365dab 100644 --- a/pylint/checkers/base.py +++ b/pylint/checkers/base.py @@ -679,7 +679,7 @@ functions, methods if emit or isinstance(inferred, const_nodes): self.add_message('using-constant-test', node=node) - def visit_module(self, node): + def visit_module(self, _): """check module name, docstring and required arguments """ self.stats['module'] += 1 diff --git a/pylint/checkers/variables.py b/pylint/checkers/variables.py index 51ff584..53559b4 100644 --- a/pylint/checkers/variables.py +++ b/pylint/checkers/variables.py @@ -723,10 +723,10 @@ builtins. Remember that you should avoid to define new builtins when possible.' _astmts.append(stmt) astmts = _astmts if len(astmts) == 1: - ass = astmts[0].assign_type() - if (isinstance(ass, (astroid.For, astroid.Comprehension, - astroid.GeneratorExp)) - and not ass.statement() is node.statement()): + assign = astmts[0].assign_type() + if (isinstance(assign, (astroid.For, astroid.Comprehension, + astroid.GeneratorExp)) + and not assign.statement() is node.statement()): self.add_message('undefined-loop-variable', args=name, node=node) @check_messages('redefine-in-handler') @@ -932,7 +932,7 @@ builtins. Remember that you should avoid to define new builtins when possible.' and not astroid.are_exclusive(stmt, defstmt, ('NameError', 'Exception', 'BaseException'))): - + # Used and defined in the same place, e.g `x += 1` and `del x` defined_by_stmt = ( defstmt is stmt diff --git a/pylint/pyreverse/vcgutils.py b/pylint/pyreverse/vcgutils.py index b9ac7b4..d135c12 100644 --- a/pylint/pyreverse/vcgutils.py +++ b/pylint/pyreverse/vcgutils.py @@ -124,7 +124,7 @@ EDGE_ATTRS = { # Misc utilities ############################################################### -class VCGPrinter: +class VCGPrinter(object): """A vcg graph writer. """ diff --git a/pylint/utils.py b/pylint/utils.py index 92d4fca..42f21d1 100644 --- a/pylint/utils.py +++ b/pylint/utils.py @@ -892,7 +892,7 @@ class PyLintASTWalker(object): its children, then leave events. """ cid = astroid.__class__.__name__.lower() - + # Detect if the node is a new name for a deprecated alias. # In this case, favour the methods for the deprecated # alias if any, in order to maintain backwards @@ -900,7 +900,7 @@ class PyLintASTWalker(object): # only the old ones will be called. old_cid = DEPRECATED_ALIASES.get(cid) visit_events = () - leave_events = () + leave_events = () if old_cid: visit_events = self.visit_events.get(old_cid) @@ -916,7 +916,7 @@ class PyLintASTWalker(object): for cb in visit_events or (): cb(astroid) # recurse on children - for child in astroid.get_children(): + for child in astroid.get_children(): self.walk(child) for cb in leave_events or (): cb(astroid) |