-
Notifications
You must be signed in to change notification settings - Fork 27
Docs for events #140
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
base: main
Are you sure you want to change the base?
Docs for events #140
Conversation
I am also wondering if we should not document the inner callbacks for the events - Ideally we should document these as proper events. Maybe we can somehow tell sphinx that we want them to be annotated as events and not as classmethods? Wondering if you have some experience with this @Cheaterman |
Great question! I haven't done that in the past, but from a quick glance at Sphinx docs, the way to achieve this might be to develop a autodoc extension that will apply some special behavior to our |
Another small detail I mentioned on Discord but will repost here - it's probably a good idea to document which SAMP/open.mp callback is being wrapped by each event, and provide a link to the corresponding open.mp documentation ; the first part so that people coming from Pawn can be 100% sure which event corresponds to the callback they're looking for, and the second part in case eg open.mp adds extra warnings or behavior changes to the official documentation (I don't think we'll be keeping it in sync constantly, probably too much maintenance burden). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve the changes and I think they are valuable to get in to our documentation as a "for now they are good enough" kind of deal.
Thank you very much @gsmj !
I however want us to clarify and label the events properly via sphinx, so we will have to follow up on that later.
Uh oh!
There was an error while loading. Please reload this page.