Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See issue #312
This feature proposal allows skipping entire directories using
autoapi_ignore
.Instead of recursing into the directory and then flagging every single file for skipping, it simply does not recurse into the directory.
Tested on a large-scale codebase and works.
Issue
I did encounter one weird edgecase during testing: faulty code is handled differently. I have one file with a handful of "X is not defined" errors that I haven't gotten around to fixing yet.
autoapi
did not used to complain about these and simply parsed out the docstrings.With this change, I encountered
L1902 points to roughly the second object in the file that is not defined. Both the first and second non-defined objects are inits of different non-existing classes from within a class init. So not only does the error handling change when skipping entire directories, it also appears to be inconsistent (the first undefined object yields no issues). I suppose this error originates from
ast
? I sadly don't know enough about howast
works to figure out exactly what changes and why skipping directories rather than files in those directories would be different.I'm also using
ast
for theskip-member
hook, which may also be at the cause. Again, i don't know enough about the order of events during docs building to investigate this further. I am willing to try if someone can direct me a little bit more to potential causes.