You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to have the missing-function-docstring and missing-module-docstring warnings enabled for the main code of my project, but not for test files where they don't add much value:
"""Tests for foo.py"""fromfooimportbardeftest_bar():
"""Tests for bar"""assertbar(1) ==2
There doesn't seem to be a way to do this at the moment, hence this feature request.
Desired solution
I'd like a way to disable these warnings for a subset of files.
There's already the --no-docstring-rgx option which I can use to disable missing-function-docstring for unit tests (which always start with test_ in my project). But there's no such option for missing-module-docstring.
@DanielNoord thanks for the triage. Am I reading this correctly that a --no-docstring-file-rgx option would not be an acceptable (more targeted) solution to this specific issue?
I think this could be a substitute to having configuration per-directory which would solve the problem more generally. Maybe it's best if we focus on per-dir configuration instead. (#618)
Current problem
I'd like to have the
missing-function-docstring
andmissing-module-docstring
warnings enabled for the main code of my project, but not for test files where they don't add much value:There doesn't seem to be a way to do this at the moment, hence this feature request.
Desired solution
I'd like a way to disable these warnings for a subset of files.
There's already the
--no-docstring-rgx
option which I can use to disablemissing-function-docstring
for unit tests (which always start withtest_
in my project). But there's no such option formissing-module-docstring
.Additional context
I asked about this on Stack Overflow and was referred here: How can I disable pylint's missing-module-docstring for unit tests?
A fix for #618 would also address my issue, but my issue could also be fixed more narrowly by adding a
--no-docstring-file-rgx
or some such.The text was updated successfully, but these errors were encountered: