diff options
author | Dolph Mathews <dolph.mathews@gmail.com> | 2016-04-13 01:14:44 +0000 |
---|---|---|
committer | Dolph Mathews <dolph.mathews@gmail.com> | 2016-04-13 01:14:44 +0000 |
commit | 45a0d08532115adc78ad343726b5f70af66a2b55 (patch) | |
tree | d7a6a21d63886f0c59b16e3a54e7ebb31d1a88e8 /tox.ini | |
parent | 5e17a784bee6aaed91bbcd8c8522733e19f4c40b (diff) | |
download | keystonemiddleware-45a0d08532115adc78ad343726b5f70af66a2b55.tar.gz |
PEP257: add flake8-docstring testing
PEP257 (https://www.python.org/dev/peps/pep-0257/) aims to "standardize
the high-level structure of docstrings: what they should contain, and
how to say it (without touching on any markup syntax within docstrings).
The PEP contains conventions, not laws or syntax."
By having this flake8 extension installed as we do in other keystone
repositories, keystonemiddleware will be automatically gated against
PEP257 docstring conventions. Of course, we're also violating several
conventions here, all of which must be ignored to get the pep8 tox job
passing.
By fixing violations one at a time, we can then remove the ignore lines
in subsequent patches.
Change-Id: Icb329b7fb42172245a635d7c089858d66a6a19da
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 21 |
1 files changed, 15 insertions, 6 deletions
@@ -35,12 +35,21 @@ commands = python setup.py testr --coverage --testr-args='{posargs}' commands = oslo_debug_helper {posargs} [flake8] -# NOTE(lbragstad): Even though we aren't ignoring any hacking checks, we have -# to leave it assigned in the environment specification otherwise some error -# checks will be ignored by default. If we need to ignore a specific hacking -# check in the future, we will have to remove '___' from the ignore line. -# See: http://flake8.readthedocs.org/en/latest/config.html#default -ignore = ___ +# D100: Missing docstring in public module +# D101: Missing docstring in public class +# D102: Missing docstring in public method +# D103: Missing docstring in public function +# D104: Missing docstring in public package +# D105: Missing docstring in magic method +# D200: One-line docstring should fit on one line with quotes +# D202: No blank lines allowed after function docstring +# D204: 1 blank line required after class docstring +# D209: Multi-line docstring closing quotes should be on a separate line +# D301: Use r""" if any backslashes in a docstring +# D400: First line should end with a period +# D401: First line should be in imperative mood +# H403: multi line docstrings should end on a new line +ignore = D100,D101,D102,D103,D104,D105,D200,D202,D209,D301,D204,D400,D401,H403 show-source = True exclude = .venv,.tox,dist,doc,*egg,build,*openstack/common* |