Skip to content

bug: Inventory config 'base_url' no longer works聽#268

Description

@connesy

Description of the bug

When specifying an inventory with a base_url that is different from the url, the base_url is ignored after the 0.28.0 rework. The rendered cross-reference URL uses the url value, not the base_url value.

The issue is that the new Inventory dataclass in https://github.com/mkdocstrings/python/blob/main/src/mkdocstrings_handlers/python/_internal/config.py#L963-L992 has a base attribute, which is also returned in the _config property as base, and not base_url. However, the load_inventory method still expects a base_url keyword, but now gets base=... which is put into **kwargs and ignored.

Environment information

python -m mkdocstrings_handlers.python._internal.debug  # | xclip -selection clipboard
  • System: Linux-6.11.0-21-generic-x86_64-with-glibc2.39
  • Python: cpython 3.12.3 (/home/stefan/salling/ml-utils-pipeline-new/.venv/bin/python)
  • Environment variables:
  • Installed packages:
    • mkdocstrings-python v1.16.8

Additional context

I'll be happy to make a PR fixing this, but I could use some help in figuring out how to add test(s) 馃檪

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions