Skip to content

bug: “type”, not “typealias“ & you’re confusing “role” and “objtype” #339

Description

@flying-sheep

Description of the bug

In these two spots, you should pass role="type", “typealias” is neither a role that exists nor a valid objtype

There’s also a bigger bug in mkdocstrings (mkdocstrings/mkdocstrings#826), and probably zensical: role != objtype:

https://github.com/mkdocstrings/mkdocstrings/blob/9a11dcb8e9b39ff6e1a22abdd362350de4e68e9f/src/mkdocstrings/_internal/inventory.py#L64

e.g. the role attr refers to objtype “attribute”,

To Reproduce

document this:

type Foo = int

the objects.inv you create will contain broken entries

Full traceback

N/A

Expected behavior

  • type statements create type entries in object.inv (not typealias)
  • attributes create attribute entries in objects.inv (not attr, that’s the role used to refer to them)

Environment information

v2.0.8

Additional context

N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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