Fix pep8 errors

"tox -e pep8" is showing these new errors

./openstack_releases/gitutils.py:52:9: W503 line break before binary operator
./openstack_releases/governance.py:77:21: W503 line break before binary operator
./openstack_releases/cmds/list_changes.py:152:21: W503 line break before binary operator
./openstack_releases/cmds/validate.py:36:1: E402 module level import not at top of file
./openstack_releases/cmds/validate.py:37:1: E402 module level import not at top of file
./openstack_releases/cmds/validate.py:38:1: E402 module level import not at top of file

Change-Id: I4c460928af038fc93ca1057953408f8cc7cac24e
This commit is contained in:
Davanum Srinivas 2016-01-12 17:10:30 -05:00
parent d5db3360fd
commit 2523637243
4 changed files with 6 additions and 8 deletions

View File

@ -148,9 +148,7 @@ def main():
start_range = previous_project['hash']
if not start_range:
start_range = (
gitutils.get_latest_tag(workdir, project['repo'])
or
None
gitutils.get_latest_tag(workdir, project['repo']) or None
)
if start_range:

View File

@ -31,12 +31,13 @@ import yaml
# Disable warnings about insecure connections.
from requests.packages import urllib3
urllib3.disable_warnings()
from openstack_releases import defaults
from openstack_releases import gitutils
from openstack_releases import versionutils
urllib3.disable_warnings()
def is_a_hash(val):
"Return bool indicating if val looks like a valid hash."

View File

@ -48,8 +48,7 @@ def commit_exists(repo, ref):
url = CGIT_TEMPLATE % (repo, ref)
response = requests.get(url)
missing_commit = (
(response.status_code // 100 != 2)
or 'Bad object id' in response.text
(response.status_code // 100 != 2) or 'Bad object id' in response.text
)
return not missing_commit

View File

@ -73,5 +73,5 @@ class Repository(object):
@property
def code_related(self):
return not (self.name.endswith('-specs')
or 'cookiecutter' in self.name)
return (not (self.name.endswith('-specs') or
'cookiecutter' in self.name))