Skip to content

Commit

Permalink
refactor: Update code for Griffe 0.46 to avoid deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Jun 18, 2024
1 parent ae5896c commit 321b407
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 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.44",
"griffe>=0.46",
]

[project.urls]
Expand Down
2 changes: 1 addition & 1 deletion src/mkdocstrings_handlers/python/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def collect(self, identifier: str, config: Mapping[str, Any]) -> CollectorItem:
if unknown_module:
extensions = self.normalize_extension_paths(final_config.get("extensions", []))
loader = GriffeLoader(
extensions=load_extensions(extensions),
extensions=load_extensions(*extensions),
search_paths=self._paths,
docstring_parser=parser,
docstring_options=parser_options,
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(check_name=False) %}
{% if members_list is not none or attribute.is_public %}
{% 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(check_name=False) %}
{% if members_list is not none or class.is_public %}
{% 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(check_name=False) %}
{% if members_list is not none or function.is_public %}
{% 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(check_name=False) %}
{% if members_list is not none or module.is_public %}
{% include module|get_template with context %}
{% endif %}
{% endfor %}
Expand All @@ -137,7 +137,7 @@ Context:

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

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

0 comments on commit 321b407

Please sign in to comment.