Skip to content

Commit 514cadc

Browse files
author
yi.wu
committed
fix style checker
1 parent 6588d2e commit 514cadc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/codestyle/docstring_checker.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,8 @@ def with_returns(self, node, doc):
291291
True if successful otherwise False.
292292
"""
293293

294+
if node.name.startswith("__") or node.name.startswith("_"):
295+
return True
294296
find = False
295297
for t in node.body:
296298
if not isinstance(t, astroid.Return):
@@ -316,6 +318,8 @@ def all_args_in_doc(self, node, doc):
316318
Returns:
317319
True if successful otherwise False.
318320
"""
321+
if node.name.startswith("__") or node.name.startswith("_"):
322+
return True
319323
args = []
320324
for arg in node.args.get_children():
321325
if (not isinstance(arg, astroid.AssignName)) \

0 commit comments

Comments
 (0)