Skip to content
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

Optional file option prep work #169

Merged
merged 8 commits into from
Jul 17, 2023
Merged

Conversation

jnikula
Copy link
Owner

@jnikula jnikula commented Jul 13, 2023

This is all the prep work from #168 without the actual functional change of making the :file: option optional. I also dropped the generator removal change, and used list() around the caller instead.

I figured this one doesn't really need specific tests, while I figure out how to test the rest of the changes.

Add a dedicated type for the root docstring returned by the parser, with
information about filename and clang args used for parsing it.
Follow the hawkmoth naming more consistently with
s/cautodoc_parsed_files/hawkmoth_parsed_files/
Move all of the parameter handling in __get_clang_args()
Handle the parsing and docstring insert in two separate steps.
Count matches across all files. In the future, we'll be interested in
more cases than just 0 and 1.
Prepare for multiple matches across multiple files, and warn about them.

Note that the autodoc directive matches all the symbols in a file,
without filtering by name, so it by design matches multiple
symbols. Don't warn about that.
In preparation for not requiring the :file: option for directives, start
iterating over the parsed results, and filtering them using the
directive specific information.
Now that parsing is a separate step, the results are no longer needed
while parsing.
@BrunoMSantos
Copy link
Collaborator

Looks good! Good idea to split it too.

@jnikula
Copy link
Owner Author

jnikula commented Jul 17, 2023

Looks good! Good idea to split it too.

Thanks for taking the time to look at this!

@jnikula jnikula merged commit 31cdd94 into master Jul 17, 2023
4 checks passed
@jnikula jnikula deleted the optional-file-option-prep-work branch July 17, 2023 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants