-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
unused-function-argument
(ARG001
) - false positive on pytest hookspec
functions
#9803
Comments
We should be able to support this. Can you link to any relevant docs on |
https://docs.pytest.org/en/7.1.x/how-to/writing_hook_functions.html#declaring-new-hooks a couple things worth noting:
|
Assuming it's defined within the same file (which seems common), we could detect that |
would still require special casing for pytest, since its |
in pytest, a new hook function is defined using the
hookspec
decorator, and the function has no implementation as it's basically like an abstract method:playground
ruff could detect the use of the
hookspec
decorator and not report the error here.related:
FBT001
andPLR0917
- false positive on pytest functions #7286The text was updated successfully, but these errors were encountered: