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

Ignore missing docstring in main function of script #532

@ajhynes7

Description

@ajhynes7

Hello,

I have several Python scripts with this format:

"""Description of the script."""


def main():
    # All of the script code.


if __name__ == "__main__":
    main()
    

It seems redundant to explain the script again inside the main function.

pydocstyle raises this error:

path/to/script.py:4 in public function `main`:
        D103: Missing docstring in public function

I don't want to ignore D103 because it's useful for functions in other modules.

I see that you have a --match option for selecting files that match a regular expression. Perhaps a feature could be added to ignore function names that match a regular expression?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions