summaryrefslogtreecommitdiff
path: root/pylint/checkers/variables.py
diff options
context:
space:
mode:
authorƁukasz Rogalski <rogalski.91@gmail.com>2016-11-06 11:34:45 +0100
committerClaudiu Popa <pcmanticore@gmail.com>2016-12-04 11:40:37 +0200
commit8bcd4059104329b6fcaa6436fc6d6fa458cca23f (patch)
tree925c08bf897df006227562712f4a9264bd1ad0f5 /pylint/checkers/variables.py
parente5aa388e01b07718e6549d10a9fff1a957c912b4 (diff)
downloadpylint-git-8bcd4059104329b6fcaa6436fc6d6fa458cca23f.tar.gz
Don't emit unused-argument and function-redefined for singledispatch implementations
Closes #1032 and #1034
Diffstat (limited to 'pylint/checkers/variables.py')
-rw-r--r--pylint/checkers/variables.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pylint/checkers/variables.py b/pylint/checkers/variables.py
index 0823864a0..c8b49f7b6 100644
--- a/pylint/checkers/variables.py
+++ b/pylint/checkers/variables.py
@@ -692,6 +692,10 @@ class VariablesChecker(BaseChecker):
if is_method and node.is_abstract():
return
+ # Don't check arguments of singledispatch.register function.
+ if utils.is_registered_in_singledispatch_function(node):
+ return
+
global_names = _flattened_scope_names(node.nodes_of_class(astroid.Global))
nonlocal_names = _flattened_scope_names(node.nodes_of_class(astroid.Nonlocal))