Fix PEP-257 violations in reviewboard/admin/
Review Request #7060 — Created March 13, 2015 and submitted
This fixes up existing docstrings to conform to PEP-8 and PEP-257 guidelines,
and adds all missing class and method docstrings in the reviewboard/admin/
directory.
Ran
pep257 --ignore=D100,D203
(disables module docstrings and the blank line
before class docstring rules). The only remaining errors were with the way we
wrap our long testcase docstrings.
Description | From | Last Updated |
---|---|---|
Should remove the "the". |
chipx86 | |
We should say what the validation functions are checking for, in all the clean functions. |
chipx86 | |
'django_reset' imported but unused |
reviewbot | |
ModPythonRequest should just go away. |
chipx86 | |
Looking at the source, I think we always have WSGIRequest these days. We can probably just remove this try/except. |
chipx86 | |
This should say what it does. |
chipx86 | |
Same. |
chipx86 | |
Missing a closing paren. |
chipx86 | |
And here. |
chipx86 | |
This should mention it must be subclassed or will raise an exception. |
chipx86 | |
This should say what it's doing. |
chipx86 | |
And here. |
chipx86 | |
And here. |
chipx86 | |
"identical" |
chipx86 | |
This should say what it's doing. |
chipx86 | |
"site configuration" |
chipx86 | |
Not sure ones like these are worth it. It's not a publicly-exposed class in any way, and the docstring is … |
chipx86 | |
Should say "URL," since we're explicitly dealing with those. |
chipx86 | |
Missing paren. |
chipx86 | |
"update" |
chipx86 | |
'django_reset' imported but unused |
reviewbot | |
X509 should be capitalized. |
brennie | |
""" on next line |
brennie | |
Should this be "an <li>" because of the way <li> is pronounced ("ell eye") ? |
brennie |
-
-
-
-
Docstrings are good, but I feel like simple ones like this that basically duplicate the function name (same with some of the "save" functions) aren't really worth it. I mean, it doesn't hurt, and I wouldn't say to remove any of them, but.. well.. thoughts?
-
-
Looking at the source, I think we always have
WSGIRequest
these days. We can probably just remove this try/except. -
-
-
-
-
-
-
-
-
-
-
-
Not sure ones like these are worth it. It's not a publicly-exposed class in any way, and the docstring is really just extra redundant noise.
-
-
-
- Commit:
-
ee55c84512abb3467a874f82372e1b461eefd33825d36744a43ad6254ae8d813a16a9afef19956d5
- Diff:
-
Revision 2 (+257 -111)
-
Tool: Pyflakes Processed Files: reviewboard/admin/checks.py reviewboard/admin/forms.py reviewboard/admin/management/commands/dumpdb.py reviewboard/admin/support.py reviewboard/admin/management/evolutions.py reviewboard/admin/views.py reviewboard/admin/siteconfig.py reviewboard/admin/templatetags/rbadmintags.py reviewboard/admin/server.py reviewboard/admin/management/commands/resolve-check.py reviewboard/admin/management/commands/loaddb.py reviewboard/admin/validation.py reviewboard/admin/management/sites.py reviewboard/admin/middleware.py reviewboard/admin/widgets.py reviewboard/admin/context_processors.py reviewboard/admin/security_checks.py reviewboard/admin/cache_stats.py reviewboard/admin/import_utils.py reviewboard/admin/tests.py Tool: PEP8 Style Checker Processed Files: reviewboard/admin/checks.py reviewboard/admin/forms.py reviewboard/admin/management/commands/dumpdb.py reviewboard/admin/support.py reviewboard/admin/management/evolutions.py reviewboard/admin/views.py reviewboard/admin/siteconfig.py reviewboard/admin/templatetags/rbadmintags.py reviewboard/admin/server.py reviewboard/admin/management/commands/resolve-check.py reviewboard/admin/management/commands/loaddb.py reviewboard/admin/validation.py reviewboard/admin/management/sites.py reviewboard/admin/middleware.py reviewboard/admin/widgets.py reviewboard/admin/context_processors.py reviewboard/admin/security_checks.py reviewboard/admin/cache_stats.py reviewboard/admin/import_utils.py reviewboard/admin/tests.py
-