Skip to content

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

@connesy

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

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy