Skip to content

Commit 321b407

Browse files
committed
refactor: Update code for Griffe 0.46 to avoid deprecation warnings
1 parent ae5896c commit 321b407

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
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.25",
33-
"griffe>=0.44",
33+
"griffe>=0.46",
3434
]
3535

3636
[project.urls]

src/mkdocstrings_handlers/python/handler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ def collect(self, identifier: str, config: Mapping[str, Any]) -> CollectorItem:
296296
if unknown_module:
297297
extensions = self.normalize_extension_paths(final_config.get("extensions", []))
298298
loader = GriffeLoader(
299-
extensions=load_extensions(extensions),
299+
extensions=load_extensions(*extensions),
300300
search_paths=self._paths,
301301
docstring_parser=parser,
302302
docstring_options=parser_options,

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

+5-5
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 attribute.is_public(check_name=False) %}
52+
{% if members_list is not none 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 class.is_public(check_name=False) %}
72+
{% if members_list is not none 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 function.is_public(check_name=False) %}
93+
{% if members_list is not none 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 module.is_public(check_name=False) %}
115+
{% if members_list is not none or module.is_public %}
116116
{% include module|get_template with context %}
117117
{% endif %}
118118
{% endfor %}
@@ -137,7 +137,7 @@ Context:
137137

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

140-
{% if members_list is not none or child.is_public(check_name=False) %}
140+
{% if members_list is not none or child.is_public %}
141141
{% if child.is_attribute %}
142142
{% with attribute = child %}
143143
{% include attribute|get_template with context %}

0 commit comments

Comments
 (0)