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 v2 #171

Merged
merged 6 commits into from
Jul 29, 2023
Merged

Optional file option v2 #171

merged 6 commits into from
Jul 29, 2023

Conversation

jnikula
Copy link
Owner

@jnikula jnikula commented Jul 22, 2023

This is based on #170 and includes everything that one has, but this finishes the job. File option beccomes optional, and it's tested (although lightly).

Support cases where _get_filenames() for non-autodoc directives may
return None. Can't convert NoneType to a list.
If no file option is provided, iterate over all previously parsed files,
and see if the symbol can be found in them.

This implicitly matches symbols from any previously parsed files. The
:file: option can still be provided to restrict to symbols from a
specific file.

If the symbol matches in multiple files, insert them all, and warn.
As the cli tests only support the autodoc directive, we don't need to
support the missing file option. However, ensure with an assert the file
is specified.
Split the handling to parsing and output phases, similar to the
extension.
Test looking up symbols from previously parsed results by dropping the
file option from the second directive in autostruct.yaml.
Document how the :file: option works now that it is optional.
@jnikula jnikula merged commit 0287741 into master Jul 29, 2023
4 checks passed
@jnikula jnikula deleted the optional-file-option-v2 branch July 29, 2023 09:25
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

1 participant