提交 514cadcc 编写于 作者: Y yi.wu

fix style checker

上级 6588d2e9
...@@ -291,6 +291,8 @@ class DocstringChecker(BaseChecker): ...@@ -291,6 +291,8 @@ class DocstringChecker(BaseChecker):
True if successful otherwise False. True if successful otherwise False.
""" """
if node.name.startswith("__") or node.name.startswith("_"):
return True
find = False find = False
for t in node.body: for t in node.body:
if not isinstance(t, astroid.Return): if not isinstance(t, astroid.Return):
...@@ -316,6 +318,8 @@ class DocstringChecker(BaseChecker): ...@@ -316,6 +318,8 @@ class DocstringChecker(BaseChecker):
Returns: Returns:
True if successful otherwise False. True if successful otherwise False.
""" """
if node.name.startswith("__") or node.name.startswith("_"):
return True
args = [] args = []
for arg in node.args.get_children(): for arg in node.args.get_children():
if (not isinstance(arg, astroid.AssignName)) \ if (not isinstance(arg, astroid.AssignName)) \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册