Skip to content
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

Merged

Conversation

typhoonzero
Copy link
Contributor

Enable docstring checker to enhance document in python codes.

gongweibao
gongweibao previously approved these changes Jun 11, 2018
Copy link
Contributor

@gongweibao gongweibao left a 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.

@@ -2959,14 +3049,32 @@ def sequence_reshape(input, new_dim):
return out


@autodoc()
# FIXME(wuyi): let docstring_checker.py under stand @autodoc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

understand

@@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable or Tensor?

Copy link
Contributor Author

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(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Contributor

@gongweibao gongweibao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@typhoonzero typhoonzero merged commit 5100c4c into PaddlePaddle:develop Jun 12, 2018
@typhoonzero typhoonzero deleted the add_python_docstring_check branch June 12, 2018 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants