Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not raise unused-argument for singledispatch implementations when the argument is used in another implementation #1034

Closed
anntzer opened this issue Jul 21, 2016 · 1 comment
Labels

Comments

@anntzer
Copy link

anntzer commented Jul 21, 2016

Steps to reproduce

In

from functools import singledispatch

@singledispatch
def func(arg):
    return arg

@func.register(int)
def _(arg):
    return 42

print(func(1), func("foo"))

pylint warns that the implementation of func for int does not use argument arg. But similarly to #225, it typically makes sense to just maintain the same signature for all implementations.

Current behavior

warning

Expected behavior

no warning

pylint --version output

pylint 1.6.4,
astroid 1.4.7
Python 3.5.2 (default, Jun 28 2016, 08:46:01)
[GCC 6.1.1 20160602]

rogalski added a commit to rogalski/pylint that referenced this issue Sep 2, 2016
rogalski added a commit to rogalski/pylint that referenced this issue Nov 6, 2016
rogalski added a commit to rogalski/pylint that referenced this issue Nov 30, 2016
rogalski added a commit to rogalski/pylint that referenced this issue Dec 3, 2016
…implementations

Closes pylint-dev#1032 and pylint-dev#1034

fix python version guard

remove dead code

drop redundant exception caught, improve coverage
rogalski added a commit to rogalski/pylint that referenced this issue Dec 3, 2016
PCManticore pushed a commit that referenced this issue Dec 4, 2016
@PCManticore
Copy link
Contributor

This is fixed now in the master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants