Skip to content

Commit

Permalink
refactor: Only filter out imported objects instead of non-public ones…
Browse files Browse the repository at this point in the history
… after applying filters

Issue-mkdocstrings/griffe-294: mkdocstrings/griffe#294
  • Loading branch information
pawamoy committed Jun 18, 2024
1 parent 321b407 commit e2f4b35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ classifiers = [
]
dependencies = [
"mkdocstrings>=0.25",
"griffe>=0.46",
"griffe>=0.47",
]

[project.urls]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Context:
{% endif %}
{% with heading_level = heading_level + extra_level %}
{% for attribute in attributes|order_members(config.members_order, members_list) %}
{% if members_list is not none or attribute.is_public %}
{% if members_list is not none or not attribute.is_imported %}
{% include attribute|get_template with context %}
{% endif %}
{% endfor %}
Expand All @@ -69,7 +69,7 @@ Context:
{% endif %}
{% with heading_level = heading_level + extra_level %}
{% for class in classes|order_members(config.members_order, members_list) %}
{% if members_list is not none or class.is_public %}
{% if members_list is not none or not class.is_imported %}
{% include class|get_template with context %}
{% endif %}
{% endfor %}
Expand All @@ -90,7 +90,7 @@ Context:
{% with heading_level = heading_level + extra_level %}
{% for function in functions|order_members(config.members_order, members_list) %}
{% if not (obj.kind.value == "class" and function.name == "__init__" and config.merge_init_into_class) %}
{% if members_list is not none or function.is_public %}
{% if members_list is not none or not function.is_imported %}
{% include function|get_template with context %}
{% endif %}
{% endif %}
Expand All @@ -112,7 +112,7 @@ Context:
{% endif %}
{% with heading_level = heading_level + extra_level %}
{% for module in modules|order_members(config.members_order.alphabetical, members_list) %}
{% if members_list is not none or module.is_public %}
{% if members_list is not none or not module.is_alias %}
{% include module|get_template with context %}
{% endif %}
{% endfor %}
Expand Down

0 comments on commit e2f4b35

Please sign in to comment.