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

Do not check private functions for args, returns or raises #31

Merged

Conversation

javierdelapuente
Copy link
Contributor

@javierdelapuente javierdelapuente commented Nov 6, 2024

This PR removes the check for args, returns and raises in private methods starting with _.

Following PEP-8, Docstrings are not necessary for non-public methods. The docstring is still necessary (following the but you should have a comment that describes what the method does).

This PR excluded the checks for private functions/methods (starting with _), but do not change the current process for functions starting with __ (which are also private functions subject to name mangling). I have done that because those functions are not so common and also because magic functions also start with __ (they also end with __, so we could differentiate them if necessary).

@javierdelapuente javierdelapuente marked this pull request as ready for review November 7, 2024 07:11
Copy link
Owner

@jdkandersson jdkandersson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, suggested a few more test cases

tests/unit/test___init__.py Show resolved Hide resolved
tests/unit/test___init__args.py Outdated Show resolved Hide resolved
tests/unit/test___init__raises.py Show resolved Hide resolved
@jdkandersson jdkandersson merged commit 4394fda into jdkandersson:main Nov 7, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants