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

Can I turn on missing-docstring for "private" functions? #8019

Open
red8888 opened this issue Jan 4, 2023 · 1 comment
Open

Can I turn on missing-docstring for "private" functions? #8019

red8888 opened this issue Jan 4, 2023 · 1 comment
Labels
Enhancement ✨ Improvement to a component Needs decision 🔒 Needs a decision before implemention or rejection
Milestone

Comments

@red8888
Copy link

red8888 commented Jan 4, 2023

Question

missing-docstring is not being applied to my functions staring with "_".

Related to this closed issue: #3177

I'm really confused about this behavior. I want docstrings for all my functions including my functions starting with "_". Why wouldn't I want that? Is there a way to turn this on?

Documentation for future user

Setting to apply missing-docstring on functions starting with "_".

Additional context

No response

@red8888 red8888 added Documentation 📗 Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling Question labels Jan 4, 2023
@Pierre-Sassoulas
Copy link
Member

I guess the reasoning is that you want docstrings for your API, so only on public function. If a function is private then you're not showing it in your doc, and it does not need a docstring. (As an aside, this check is already annoying as is, most of the time the name of the arguments should be descriptive enough and we want to deactivate by default, see #3512),

If we want to permit to check private function and inner function then we should add an option like check-private_function-for-missing-docstring that would be False by default.

@Pierre-Sassoulas Pierre-Sassoulas added Enhancement ✨ Improvement to a component Needs decision 🔒 Needs a decision before implemention or rejection and removed Question Documentation 📗 Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Jan 4, 2023
@Pierre-Sassoulas Pierre-Sassoulas added this to the 4.0.0 milestone Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ✨ Improvement to a component Needs decision 🔒 Needs a decision before implemention or rejection
Projects
None yet
Development

No branches or pull requests

2 participants