Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: merge_init_into_class does not merge overloads #335

Open
kaktus42 opened this issue Nov 20, 2024 · 0 comments
Open

bug: merge_init_into_class does not merge overloads #335

kaktus42 opened this issue Nov 20, 2024 · 0 comments
Assignees
Labels
unconfirmed This bug was not reproduced yet

Comments

@kaktus42
Copy link

kaktus42 commented Nov 20, 2024

Description of the bug

When using merge_init_into_class, signature overloads (typing.overload) are not merged into the class' docs.

To Reproduce

Example:

from typing import overload

class Foo:
    """
    Foo class docs
    """

    @overload
    def __init__(self, *, a: str): ...

    @overload
    def __init__(self, *, b: str): ...

    def __init__(self, **kwargs):
        """
        Foo constructor docs
        """
        pass
merge_init_into_class: true merge_init_into_class: false
Screenshot 2024-11-20 at 14 03 51 Screenshot 2024-11-20 at 14 03 15
WRITE MRE / INSTRUCTIONS HERE

Expected behavior

The overload defs should also be rendered.

Environment information

griffe --debug-info  # | xclip -selection clipboard
  • System: macOS-14.7.1-x86_64-i386-64bit
  • Python: cpython 3.12.7 (/usr/local/Caskroom/miniconda/base/envs/medconb-client/bin/python3.12)
  • Environment variables:
  • Installed packages:
    • griffe v1.5.1

Additional context

@kaktus42 kaktus42 added the unconfirmed This bug was not reproduced yet label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unconfirmed This bug was not reproduced yet
Projects
None yet
Development

No branches or pull requests

2 participants