8000 bug: Typing.Overload from pyi file not showing in generated docs · Issue #182 · mkdocstrings/python · GitHub
[go: up one dir, main page]

Skip to content
bug: Typing.Overload from pyi file not showing in generated docs #182
Closed as not planned
@nvoxland-al

Description

@nvoxland-al

Description of the bug

I have methods defined with @typing.overload but they are not showing up in the generated docs. Other methods show up fine, but not the overload ones. There are no warnings. I am using the insiders version of mkdocstring-python and griffe

My docs are generated from definitions like this in my pyi file:

@typing.overload
def add_column(
    self, name: str, type: types.DataType, format: formats.DataFormat
) -> None:
    """
    Add a new column to the data container
    """

@typing.overload
def add_column(self, name: str, type: types.HumanType) -> None:
    """
    Add a new column to the data container
    """

@typing.overload
def add_column(self, name: str, type: types.DataType) -> None:
    """
    Add a new column to the data container
    """

NOTE: There is not any backing .py file because this is a wrapper around a c++ python module. So the mkdocstrings generation is purely going against the .pyi files.

To Reproduce

.pyi file with the definitions above

Expected behavior

Expect the overloaded methods to show in the docs

Environment information

  • System: Linux-6.6.31-linuxkit-aarch64-with
  • Python: cpython 3.11.9 (/usr/local/bin/python)
  • Environment variables:
  • Installed packages:
    • mkdocs v1.6.0
    • mkdocstrings v0.25.2
    • mkdocstrings-python v1.10.8.1.8.3
    • griffe v0.49.0.1.2.1.dev2+g5d4e082

Additional context

Metadata

Metadata

Assignees

Labels

griffe extensionCan be solved with a Griffe extension

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0