diff options
| author | Florian Bruhin <me@the-compiler.org> | 2015-04-20 13:53:10 +0200 |
|---|---|---|
| committer | Florian Bruhin <me@the-compiler.org> | 2015-04-20 13:53:10 +0200 |
| commit | 722d9d45550af37aca6c2517d771f192a7a40461 (patch) | |
| tree | d9693291bc5534bee8683d9d564242112293334a | |
| parent | df2d1ab9e4d9208ad0d73913f30080310b818cbe (diff) | |
| download | pylint-722d9d45550af37aca6c2517d771f192a7a40461.tar.gz | |
Use no-docstring-rgx option to not emit missing-docstring for private funcs.
| -rw-r--r-- | pylint/checkers/base.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pylint/checkers/base.py b/pylint/checkers/base.py index e0eb551..9fbedd6 100644 --- a/pylint/checkers/base.py +++ b/pylint/checkers/base.py @@ -56,8 +56,8 @@ CONST_NAME_RGX = re.compile('(([A-Z_][A-Z0-9_]*)|(__.*__))$') COMP_VAR_RGX = re.compile('[A-Za-z_][A-Za-z0-9_]*$') DEFAULT_NAME_RGX = re.compile('[a-z_][a-z0-9_]{2,30}$') CLASS_ATTRIBUTE_RGX = re.compile(r'([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$') -# do not require a doc string on system methods -NO_REQUIRED_DOC_RGX = re.compile('__.*__') +# do not require a doc string on private/system methods +NO_REQUIRED_DOC_RGX = re.compile('_.*') REVERSED_PROTOCOL_METHOD = '__reversed__' SEQUENCE_PROTOCOL_METHODS = ('__getitem__', '__len__') REVERSED_METHODS = (SEQUENCE_PROTOCOL_METHODS, @@ -1204,8 +1204,6 @@ class DocStringChecker(_BasicChecker): if docstring is None: if not report_missing: return - if node.name.startswith("_"): - return if node.body: lines = node.body[-1].lineno - node.body[0].lineno + 1 else: |
