Repository navigation
Conversation
Signed-off-by: Wilson Vargas Martinez <wvargasm4887@universidadean.edu.co>
Add test for __all__ whitelist functionality in pdoc. Signed-off-by: Wilson Vargas Martinez <wvargasm4887@universidadean.edu.co>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #230
When a module defines
__all__, members that are not listed there but are whitelisted in__pdoc__(__pdoc__['name'] = True) were ignored, although the documentation says this should include them.Now, after the members listed in
__all__, pdoc also adds the module's own members (or ones with a PEP-224 docstring) that are whitelisted and not blacklisted. Theis_from_this_modulehelper moved out of theelsebranch so both branches share it. Modules without__all__behave as before.test__all__whitelist, which fails without the change.python -m unittest pdoc.test: 83 tests pass.test_lunr_searcherrors both with and without this change (it needs Node).AI disclosure: this change was prepared with Claude (Claude Code, Anthropic) at the submitter's request.