Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

D417: Ignore arguments marked as unused #438

Closed
karlch opened this issue Dec 11, 2019 · 0 comments · Fixed by #440
Closed

D417: Ignore arguments marked as unused #438

karlch opened this issue Dec 11, 2019 · 0 comments · Fixed by #440

Comments

@karlch
Copy link

karlch commented Dec 11, 2019

First of all thanks for a really useful tool and the great D417 which has caught many issues for me!

I feel like D417 should not complain for arguments marked as unused by prepending an underscore. This is also how pylint handles the unused-argument error.

Consider e.g.:

def handle_interrupt(self, signum: int, _frame: FrameType) -> None:
    ...

We provide the _frame argument to make the callback signature valid, but never actually use it in the later code. IMHO documenting _frame in this case should not be required.

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

Successfully merging a pull request may close this issue.

1 participant