-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
docutils - added missing stubs for __init__ methods #5924
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
docutils - added missing stubs for __init__ methods #5924
Conversation
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.
Thanks, stubtest has a few complaints. Some more notes below.
Also, could you update the version in METADATA.toml
to 0.17
?
Thanks for the incredibly quick comments @srittau I'll address them now. |
@srittau I think that's the lot! Thank you so much for your fast and detailed feedback! |
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.
One more thing I missed the first time round.
…annot express them currently
Co-authored-by: Akuli <[email protected]>
The
OptionParser
andDirective
classes had no__init__
method stubs which was causing mypy to claim my valid arguments were not expected.For the
Directive
class I used the documentation from https://docutils.sourceforge.io/0.4/docs/howto/rst-directives.html as my guide.For the
OptionParser
class I referred to the original source code: and some implementation examples from Sphinx.It's worth calling out the
components
parameter as it expects a class rather than an object to be passed in (see the Sphinx example for confirmation).I have read the contribution guidelines and I think everything here is up to code, if not I'll fix it ASAP!