Fix some PEP-257 issues in reviewboard/accounts/.
Review Request #6929 — Created Feb. 10, 2015 and submitted
If we're eventually going to integrate the PEP-257 tool into Review Bot (which
I think we should), we should get our docstring house in order first. This
change goes through reviewboard/accounts and fixes most of the issues that
aren't just a missing docstring.The one "error" that I chose to disable for this is D203, which wants a blank
line before class docstrings. I didn't see any justification for this in the
actual PEP-257 document, and I think it's ugly. There are also a couple cases
that I chose to ignore where our test docstrings which wrap didn't follow the
usual rules. There are a ton of things that have missing docstrings, but those
will require more work to clean up.
- Ran unit tests
- Ran
pep257 --ignore=D203 reviewboard/accounts
Description | From | Last Updated |
---|---|---|
The summary line should be on the """. |
chipx86 | |
I briefly mentioned this in a different review request when this came up, but I think "Get" isn't explicit enough. … |
chipx86 | |
Summary should be on the previous line. |
chipx86 | |
Same here. |
chipx86 | |
The old docs weren't very explicit, but they had more information than the new one. How about expanding to talk … |
chipx86 | |
"Display" ? |
chipx86 | |
""" on the next line. |
chipx86 |
-
-
-
I briefly mentioned this in a different review request when this came up, but I think "Get" isn't explicit enough. Since we're describing it as an action, this sounds like it's saying that the function is getting the backends, but it's not clear that it's actually returning them. Lots of functions get things without returning them.
-
-
-
Just curious, why is the blank line required? It doesn't seem to be consistent with the requirements for functions?
-
The old docs weren't very explicit, but they had more information than the new one. How about expanding to talk about how the auth backend comes into play, and what happens if the auth backend doesn't support registration?
- Commit:
-
68abf78a4a3f5e62a54409531fa6e41079267b7b683a4816e79bb858434c60830c5062da788fcacf
- Diff:
-
Revision 2 (+123 -84)
-
Tool: PEP8 Style Checker Processed Files: reviewboard/accounts/decorators.py reviewboard/accounts/backends.py reviewboard/accounts/views.py reviewboard/accounts/trophies.py reviewboard/accounts/pages.py reviewboard/accounts/forms/pages.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py reviewboard/accounts/forms/auth.py reviewboard/accounts/forms/registration.py reviewboard/accounts/admin.py reviewboard/accounts/middleware.py Tool: Pyflakes Processed Files: reviewboard/accounts/decorators.py reviewboard/accounts/backends.py reviewboard/accounts/views.py reviewboard/accounts/trophies.py reviewboard/accounts/pages.py reviewboard/accounts/forms/pages.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py reviewboard/accounts/forms/auth.py reviewboard/accounts/forms/registration.py reviewboard/accounts/admin.py reviewboard/accounts/middleware.py
- Commit:
-
683a4816e79bb858434c60830c5062da788fcacff5fc85325c78d225d68634366da02a8ac7f4edc5
- Diff:
-
Revision 3 (+123 -83)
-
Tool: PEP8 Style Checker Processed Files: reviewboard/accounts/decorators.py reviewboard/accounts/backends.py reviewboard/accounts/views.py reviewboard/accounts/trophies.py reviewboard/accounts/pages.py reviewboard/accounts/forms/pages.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py reviewboard/accounts/forms/auth.py reviewboard/accounts/forms/registration.py reviewboard/accounts/admin.py reviewboard/accounts/middleware.py Tool: Pyflakes Processed Files: reviewboard/accounts/decorators.py reviewboard/accounts/backends.py reviewboard/accounts/views.py reviewboard/accounts/trophies.py reviewboard/accounts/pages.py reviewboard/accounts/forms/pages.py reviewboard/accounts/managers.py reviewboard/accounts/models.py reviewboard/accounts/tests.py reviewboard/accounts/forms/auth.py reviewboard/accounts/forms/registration.py reviewboard/accounts/admin.py reviewboard/accounts/middleware.py