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
feat: Add trim_doctest_flag
to google and numpy parsers
#134
feat: Add trim_doctest_flag
to google and numpy parsers
#134
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.
Very, very nice! Thanks a lot!
You can rebase on
Indeed, the RST parser does not even parse code examples. I will not ask you to add it, but if you want to do so, be my guest. Also, are you really using reStructuredText in your pyjanitor docstrings? I have to say that I strongly recommend switching to a style more akin to Markdown (google or even numpydoc): after all, you are generating docs with MkDocs, which uses Markdown exclusively 😕 Maybe you have this planned though, in that case, just ignore my comment 🙂 As to pointing you in the right direction if you want to try and implement code example parsing in the RST parser: I won't be of any help unfortunately. The RST parser was implemented by @plannigan. |
|
Arf, I thought I was on another repo, my bad! The main branch is I checked your docstrings: you're not really using RST I think, I just mislead myself by naming the parser "RST", when the |
4047a10
to
80166e1
Compare
The type check failed but I will fix it just after merging your PR if you don't mind. |
Sure, thanks! |
Related to: mkdocstrings/mkdocstrings#386
I've decided to start the work on the above issue starting from the legacy parser. Please take a look and see if I'm going in the right direction or if I've missed anything crucial.
Key PR pointers
# doctest:
and<BLANKLINE>
via regex; in both cases where 1. line starts with>>>
and 2. line is "in a code example block". This is activated via the newtrim_doctest_flags
parameter / option.trim_doctest_flags
to be True. To keep consistent with Sphinx.pyjanitor
project is using the rst / legacy-python combination 😅 )trim_doctest_flags=False
as default argument in the test suite.docstring_options
.Addendum