Skip to content

Commit 35eb811

Browse files
committed
refactor: Improve guessing whether an object is public
1 parent 70c81ce commit 35eb811

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ classifiers = [
3030
]
3131
dependencies = [
3232
"mkdocstrings>=0.20",
33-
"griffe>=0.33",
33+
"griffe>=0.35",
3434
]
3535

3636
[project.urls]

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
{% endif %}
3232
{% with heading_level = heading_level + extra_level %}
3333
{% for attribute in attributes|order_members(config.members_order, members_list) %}
34-
{% if not attribute.is_alias or attribute.is_explicitely_exported or attribute.inherited %}
34+
{% if members_list is none and attribute.is_public(check_name=False) %}
3535
{% include attribute|get_template with context %}
3636
{% endif %}
3737
{% endfor %}
@@ -51,7 +51,7 @@
5151
{% endif %}
5252
{% with heading_level = heading_level + extra_level %}
5353
{% for class in classes|order_members(config.members_order, members_list) %}
54-
{% if not class.is_alias or class.is_explicitely_exported or class.inherited %}
54+
{% if members_list is none and class.is_public(check_name=False) %}
5555
{% include class|get_template with context %}
5656
{% endif %}
5757
{% endfor %}
@@ -72,7 +72,7 @@
7272
{% with heading_level = heading_level + extra_level %}
7373
{% for function in functions|order_members(config.members_order, members_list) %}
7474
{% if not (obj.kind.value == "class" and function.name == "__init__" and config.merge_init_into_class) %}
75-
{% if not function.is_alias or function.is_explicitely_exported or function.inherited %}
75+
{% if members_list is none and function.is_public(check_name=False) %}
7676
{% include function|get_template with context %}
7777
{% endif %}
7878
{% endif %}
@@ -94,7 +94,7 @@
9494
{% endif %}
9595
{% with heading_level = heading_level + extra_level %}
9696
{% for module in modules|order_members(config.members_order.alphabetical, members_list) %}
97-
{% if not module.is_alias or module.is_explicitely_exported or module.inherited %}
97+
{% if members_list is none and module.is_public(check_name=False) %}
9898
{% include module|get_template with context %}
9999
{% endif %}
100100
{% endfor %}
@@ -119,7 +119,7 @@
119119

120120
{% if not (obj.is_class and child.name == "__init__" and config.merge_init_into_class) %}
121121

122-
{% if not child.is_alias or child.is_explicitely_exported or child.inherited %}
122+
{% if members_list is none and child.is_public(check_name=False) %}
123123
{% if child.is_attribute %}
124124
{% with attribute = child %}
125125
{% include attribute|get_template with context %}

0 commit comments

Comments
 (0)