-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Confusion in documentation: "Declaring New Hooks" #7706
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
Comments
All good points @mcow, thanks! |
@nicoddemus Can I please work on this issue? |
@kamahmad sure, no need to ask. 😁 👍 |
@nicoddemus this is the first time I'm contributing to open source so might need a little help. :) For point 1 and 2, I have changed the doc - For point 3, I have decorated |
Sorry for the delay, lots of things going around lately!
Sure, welcome! Just so you now, it is perfectly fine to open an incomplete PR and ask questions over there. 😁 You can use GH's draft PRs to better communicate that.
Sounds good.
No need to point that out in that example; pytest doesn't require an explicit Thanks! |
@nicoddemus - no worries :) thanks for answering my questions. I've created a draft PR as you suggested. Can you please have a look and let me know if it's ok. Thanks. |
In this section there are several details in the examples that could be improved for less confusion:
hook.py
but the import of it readsimport hooks
; the names do not match. Consider using a less generic name, such assample_hook.py
.hook
object, available in the config object." Is "thehook
object" always namedhook
(yes it is, but that's the confusing point) or is it namedhook
because the example module ishook.py
?pytest_addhooks()
implementations withhookimpl
(with the AT sign, of course)? Documentation somewhere that explains when/whether this decoration is optional would also be appreciated.Config
object; this is done in the xdist example, in fact.The text was updated successfully, but these errors were encountered: