summaryrefslogtreecommitdiff
path: root/pylint/extensions
diff options
context:
space:
mode:
authorBruno Daniel <bruno.daniel@blue-yonder.com>2015-05-10 13:57:24 +0200
committerBruno Daniel <bruno.daniel@blue-yonder.com>2015-05-10 13:57:24 +0200
commit9cb287e98d22d350fd2e6b5bd1532fde59ae12e7 (patch)
treea09d9a6188779a7e7997908cdce68637ee73d8db /pylint/extensions
parentbaac9b505d0d6e42746f16f2b201352d667687a4 (diff)
downloadpylint-9cb287e98d22d350fd2e6b5bd1532fde59ae12e7.tar.gz
check_docs: implementation of option "accept-no-param-doc"
Diffstat (limited to 'pylint/extensions')
-rw-r--r--pylint/extensions/check_docs.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/pylint/extensions/check_docs.py b/pylint/extensions/check_docs.py
index 973b38f..6c29262 100644
--- a/pylint/extensions/check_docs.py
+++ b/pylint/extensions/check_docs.py
@@ -54,7 +54,14 @@ class ParamDocChecker(BaseChecker):
'Please add parameter type declarations for all parameters.'),
}
- options = ()
+ options = (('accept-no-param-doc',
+ {'default': True,
+ 'type': 'bool',
+ 'help': 'Whether to accept totally missing parameter '
+ 'documentation in a docstring of a function that has '
+ 'parameters'
+ }),
+ )
priority = -2
@@ -204,7 +211,8 @@ class ParamDocChecker(BaseChecker):
params_with_doc, params_with_type = self.match_param_docs(doc)
# Tolerate no parameter documentation at all.
- if not params_with_doc:
+ if (not params_with_doc and not params_with_type
+ and self.config.accept_no_param_doc):
tolerate_missing_params = True
compare_args(params_with_doc, 'missing-param-doc',