diff options
author | Ćukasz Rogalski <rogalski.91@gmail.com> | 2016-11-06 11:34:45 +0100 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2016-12-04 11:40:37 +0200 |
commit | 8bcd4059104329b6fcaa6436fc6d6fa458cca23f (patch) | |
tree | 925c08bf897df006227562712f4a9264bd1ad0f5 /pylint/checkers/variables.py | |
parent | e5aa388e01b07718e6549d10a9fff1a957c912b4 (diff) | |
download | pylint-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.py | 4 |
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)) |