From 768c53474ddaf78e6e89f56b36ac3273a6031b0a Mon Sep 17 00:00:00 2001 From: Luo Gangyi Date: Tue, 8 Dec 2015 21:37:49 -0800 Subject: [PATCH] Enable pep8 H405 tests Enabled H405 multi line docstring summary not separated with an empty line in tox testing. Change-Id: I1a4bfbd2bad6eb2c132843ca21451807737121df Closes-Bug:#1524176 --- pbr/core.py | 6 ++++-- pbr/packaging.py | 10 ++++++---- tox.ini | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/pbr/core.py b/pbr/core.py index ef6a5460..3cbd0d63 100644 --- a/pbr/core.py +++ b/pbr/core.py @@ -75,8 +75,10 @@ else: def pbr(dist, attr, value): - """Implements the actual pbr setup() keyword. When used, this should be - the only keyword in your setup() aside from `setup_requires`. + """Implements the actual pbr setup() keyword. + + When used, this should be the only keyword in your setup() aside from + `setup_requires`. If given as a string, the value of pbr is assumed to be the relative path to the setup.cfg file to use. Otherwise, if it evaluates to true, it diff --git a/pbr/packaging.py b/pbr/packaging.py index f9203746..583a8cf6 100644 --- a/pbr/packaging.py +++ b/pbr/packaging.py @@ -634,10 +634,12 @@ def _get_version_from_pkg_metadata(package_name): def get_version(package_name, pre_version=None): - """Get the version of the project. First, try getting it from PKG-INFO or - METADATA, if it exists. If it does, that means we're in a distribution - tarball or that install has happened. Otherwise, if there is no PKG-INFO - or METADATA file, pull the version from git. + """Get the version of the project. + + First, try getting it from PKG-INFO or METADATA, if it exists. If it does, + that means we're in a distribution tarball or that install has happened. + Otherwise, if there is no PKG-INFO or METADATA file, pull the version + from git. We do not support setup.py version sanity in git archive tarballs, nor do we support packagers directly sucking our git repo into theirs. We expect diff --git a/tox.ini b/tox.ini index 7c98b5a4..a135f9a4 100644 --- a/tox.ini +++ b/tox.ini @@ -34,6 +34,6 @@ commands = {posargs} # H405 multi line docstring summary not separated with an empty line # H904 "Wrap lines in parentheses and not a backslash for line continuation # Removed in current hacking (https://review.openstack.org/#/c/101701/). -ignore = H405,H803,H904 +ignore = H803,H904 exclude = .venv,.tox,dist,doc,*.egg,build show-source = true