From 514cadcc38d2465ab037e909304abdf5dbba167a Mon Sep 17 00:00:00 2001 From: "yi.wu" Date: Fri, 15 Jun 2018 13:41:40 +0800 Subject: [PATCH] fix style checker --- tools/codestyle/docstring_checker.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/codestyle/docstring_checker.py b/tools/codestyle/docstring_checker.py index 54a69046269..8d4b24a0cf6 100644 --- a/tools/codestyle/docstring_checker.py +++ b/tools/codestyle/docstring_checker.py @@ -291,6 +291,8 @@ class DocstringChecker(BaseChecker): True if successful otherwise False. """ + if node.name.startswith("__") or node.name.startswith("_"): + return True find = False for t in node.body: if not isinstance(t, astroid.Return): @@ -316,6 +318,8 @@ class DocstringChecker(BaseChecker): Returns: True if successful otherwise False. """ + if node.name.startswith("__") or node.name.startswith("_"): + return True args = [] for arg in node.args.get_children(): if (not isinstance(arg, astroid.AssignName)) \ -- GitLab