File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ from typing import TYPE_CHECKING
88
99import griffe
1010import pytest
11- from mkdocstrings.inventory import Inventory
11+ from mkdocstrings import Inventory
1212
1313import {{ python_package_import_name }}
1414
@@ -153,7 +153,11 @@ def test_inventory_matches_api(
153153 public_api_paths = {obj.path for obj in public_objects}
154154 public_api_paths.add("{{ python_package_import_name }}")
155155 for item in inventory.values():
156- if item.domain == "py" and "(" not in item.name:
156+ if (
157+ item.domain == "py"
158+ and "(" not in item.name
159+ and (item.name == "{{ python_package_import_name }}" or item.name.startswith("{{ python_package_import_name }}."))
160+ ):
157161 obj = loader.modules_collection[item.name]
158162 if obj.path not in public_api_paths and not any(path in public_api_paths for path in obj.aliases):
159163 not_in_api.append(item.name)
You can’t perform that action at this time.
0 commit comments