-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable docstring checker and fix comments #11351
Enable docstring checker and fix comments #11351
Conversation
… add_python_docstring_check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just two small problems.
python/paddle/fluid/layers/nn.py
Outdated
@@ -2959,14 +3049,32 @@ def sequence_reshape(input, new_dim): | |||
return out | |||
|
|||
|
|||
@autodoc() | |||
# FIXME(wuyi): let docstring_checker.py under stand @autodoc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
understand
python/paddle/fluid/layers/nn.py
Outdated
@@ -3024,8 +3132,9 @@ def transpose(x, perm, name=None): | |||
perm[i]-th dimension of `input`. | |||
|
|||
Args: | |||
input (Variable): (Tensor), A Tensor. | |||
perm (list): A permutation of the dimensions of `input`. | |||
x (Variable): (Tensor), A Tensor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable or Tensor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
return False | ||
|
||
for t in args: | ||
if t not in parsed_args: | ||
print t, " with (type) not in ", parsed_args | ||
self.add_message('W9003', node=node, line=node.fromlineno) | ||
self.add_message( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
… add_python_docstring_check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Enable docstring checker to enhance document in python codes.