Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

D107 (Missing docstring in __init__) conflicts with D418 (@overload shouldn't contain docstring) #613

Open
rigelifland opened this issue Dec 19, 2022 · 1 comment

Comments

@rigelifland
Copy link

You can't overload an init without failing one or the other of these rules currently:

class A:
    @overload
    def __init__(self):
                           # This fails D107: Missing docstring in __init__
        pass

    def __init__(self):
        """Docstring."""
        pass

class B:
    @overload
    def __init__(self):
        """Docstring."""  # This fails D418: Function/ Method decorated with @overload shouldn't contain a docstring
        pass

    def __init__(self):
        """Docstring."""
        pass
@adamjstewart
Copy link

Duplicate of #525

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants