Skip to content

__init__method is not listed in its own section in class docs #239

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

Closed
jkugler opened this issue Aug 6, 2020 · 2 comments
Closed

__init__method is not listed in its own section in class docs #239

jkugler opened this issue Aug 6, 2020 · 2 comments
Labels
wontfix This will not be worked on

Comments

@jkugler
Copy link

jkugler commented Aug 6, 2020

Expected Behavior

I have a class which inherits and overrides certain behavior, including the constructor (__init__). I would expect the doc strings for the class, constructor, and overridden method to all be separate, and the methods all listed.

Actual Behavior

The doc strings for the class and constructor are put together, and there is no section for the init method.

Steps to Reproduce

class ArgumentParser(argparse.ArgumentParser):
    """A custom argument parser"""

    def __init__(self, *args, **kwargs):
        """Sets the program name to the command invoked by dk, if needed"""
        if len(sys.argv) > 1:
            argparse.ArgumentParser.__init__(self, prog=sys.argv[1], *args, **kwargs)
        else:
            argparse.ArgumentParser.__init__(self, *args, **kwargs)

    def error(self, message):
        """Raises an exception instead of exit

Additional info

  • pdoc version: pdoc3 0.8.4

See picture for the output of the pdoc3.

Screenshot_20200806_134627

@jkugler
Copy link
Author

jkugler commented Aug 6, 2020

Never mind. Found this: https://pdoc3.github.io/pdoc/doc/pdoc/#what-objects-are-documented&gsc.tab=0

I never considered __init__ to be a private method, I guess. :)

@jkugler jkugler closed this as completed Aug 6, 2020
@kernc
Copy link
Member

kernc commented Aug 6, 2020

__init__ is special-cased since #24.

@kernc kernc added the wontfix This will not be worked on label Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Development

No branches or pull requests

2 participants