Skip to content

bug: Typing.Overload from pyi file not showing in generated docs #182

@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

    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