Skip to content

Commit 587963b

Browse files
committed
fix: Mix both previous checks for displaying objects: not imported or public
Issue-294: mkdocstrings/griffe#294
1 parent 94b736b commit 587963b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/mkdocstrings_handlers/python/templates/material/_base/children.html.jinja

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Context:
4949
{% endif %}
5050
{% with heading_level = heading_level + extra_level %}
5151
{% for attribute in attributes|order_members(config.members_order, members_list) %}
52-
{% if members_list is not none or not attribute.is_imported %}
52+
{% if members_list is not none or (not attribute.is_imported or attribute.is_public) %}
5353
{% include attribute|get_template with context %}
5454
{% endif %}
5555
{% endfor %}
@@ -69,7 +69,7 @@ Context:
6969
{% endif %}
7070
{% with heading_level = heading_level + extra_level %}
7171
{% for class in classes|order_members(config.members_order, members_list) %}
72-
{% if members_list is not none or not class.is_imported %}
72+
{% if members_list is not none or (not class.is_imported or class.is_public) %}
7373
{% include class|get_template with context %}
7474
{% endif %}
7575
{% endfor %}
@@ -90,7 +90,7 @@ Context:
9090
{% with heading_level = heading_level + extra_level %}
9191
{% for function in functions|order_members(config.members_order, members_list) %}
9292
{% if not (obj.kind.value == "class" and function.name == "__init__" and config.merge_init_into_class) %}
93-
{% if members_list is not none or not function.is_imported %}
93+
{% if members_list is not none or (not function.is_imported or function.is_public) %}
9494
{% include function|get_template with context %}
9595
{% endif %}
9696
{% endif %}
@@ -112,7 +112,7 @@ Context:
112112
{% endif %}
113113
{% with heading_level = heading_level + extra_level %}
114114
{% for module in modules|order_members(config.members_order.alphabetical, members_list) %}
115-
{% if members_list is not none or not module.is_alias %}
115+
{% if members_list is not none or (not module.is_alias or module.is_public) %}
116116
{% include module|get_template with context %}
117117
{% endif %}
118118
{% endfor %}

0 commit comments

Comments
 (0)