Skip to content

Commit

Permalink
--include-undocumented should not apply to modules, fix #724 (#728)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhils authored Aug 13, 2024
1 parent bff06ef commit 22503d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

## Unreleased: pdoc next

- Fix a bug where entire modules would be excluded by `--no-include-undocumented`.
To exclude modules, see https://pdoc.dev/docs/pdoc.html#exclude-submodules-from-being-documented.
([#728](https://github.com/mitmproxy/pdoc/pull/728), @mhils)

## 2024-07-24: pdoc 14.6.0

- If `example.data.Data` is also exposed as `example.Data`, pdoc now links to `example.Data` in documentation.
Expand Down
2 changes: 1 addition & 1 deletion pdoc/templates/default/module.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ See https://pdoc.dev/docs/pdoc/render_helpers.html#DefaultMacroExtension for an
{% elif "@public" in doc.docstring %}
{# show members explicitly marked as @public #}
true
{% elif not include_undocumented and not doc.docstring %}
{% elif not include_undocumented and not doc.docstring and doc.kind != "module" %}
{# hide members that are undocumented if include_undocumented has been toggled off. #}
{% elif doc.name == "__init__" and (doc.docstring or (doc.kind == "function" and doc.signature_without_self.parameters)) %}
{# show constructors that have a docstring or at least one extra argument #}
Expand Down

0 comments on commit 22503d1

Please sign in to comment.