Skip to content

Commit

Permalink
refactor: Improve guessing whether an object is public
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Aug 23, 2023
1 parent 70c81ce commit 35eb811
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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.20",
"griffe>=0.33",
"griffe>=0.35",
]

[project.urls]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{% endif %}
{% with heading_level = heading_level + extra_level %}
{% for attribute in attributes|order_members(config.members_order, members_list) %}
{% if not attribute.is_alias or attribute.is_explicitely_exported or attribute.inherited %}
{% if members_list is none and attribute.is_public(check_name=False) %}
{% include attribute|get_template with context %}
{% endif %}
{% endfor %}
Expand All @@ -51,7 +51,7 @@
{% endif %}
{% with heading_level = heading_level + extra_level %}
{% for class in classes|order_members(config.members_order, members_list) %}
{% if not class.is_alias or class.is_explicitely_exported or class.inherited %}
{% if members_list is none and class.is_public(check_name=False) %}
{% include class|get_template with context %}
{% endif %}
{% endfor %}
Expand All @@ -72,7 +72,7 @@
{% 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 not function.is_alias or function.is_explicitely_exported or function.inherited %}
{% if members_list is none and function.is_public(check_name=False) %}
{% include function|get_template with context %}
{% endif %}
{% endif %}
Expand All @@ -94,7 +94,7 @@
{% endif %}
{% with heading_level = heading_level + extra_level %}
{% for module in modules|order_members(config.members_order.alphabetical, members_list) %}
{% if not module.is_alias or module.is_explicitely_exported or module.inherited %}
{% if members_list is none and module.is_public(check_name=False) %}
{% include module|get_template with context %}
{% endif %}
{% endfor %}
Expand All @@ -119,7 +119,7 @@

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

{% if not child.is_alias or child.is_explicitely_exported or child.inherited %}
{% if members_list is none and child.is_public(check_name=False) %}
{% if child.is_attribute %}
{% with attribute = child %}
{% include attribute|get_template with context %}
Expand Down

0 comments on commit 35eb811

Please sign in to comment.