diff options
| author | Zuul <zuul@review.opendev.org> | 2020-05-17 14:07:15 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2020-05-17 14:07:15 +0000 |
| commit | fe54fdbc347cac4820e51c4bbd44ad71f6dd4e74 (patch) | |
| tree | 4ac70a7c4404677fc0d2d5fe4ffb6a53756fcb41 | |
| parent | f942e93d12376f7ad8ea1345c3d2d052dd37867a (diff) | |
| parent | 22f7aecbd9e9a9be0e67611f68fd5ff2fc4a4b8a (diff) | |
| download | kolla-ansible-fe54fdbc347cac4820e51c4bbd44ad71f6dd4e74.tar.gz kolla-ansible-fe54fdbc347cac4820e51c4bbd44ad71f6dd4e74.zip | |
Merge "Enable W503 for flake8 check"
| -rw-r--r-- | ansible/library/kolla_docker.py | 4 | ||||
| -rwxr-xr-x | kolla_ansible/cmd/genpwd.py | 6 | ||||
| -rw-r--r-- | tox.ini | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/ansible/library/kolla_docker.py b/ansible/library/kolla_docker.py index 7b150f078..8c7cab7ae 100644 --- a/ansible/library/kolla_docker.py +++ b/ansible/library/kolla_docker.py @@ -624,8 +624,8 @@ class DockerWorker(object): split_vol = vol.split(':') - if (len(split_vol) == 2 - and ('/' not in split_vol[0] or '/' in split_vol[1])): + if (len(split_vol) == 2 and + ('/' not in split_vol[0] or '/' in split_vol[1])): split_vol.append('rw') vol_list.append(split_vol[1]) diff --git a/kolla_ansible/cmd/genpwd.py b/kolla_ansible/cmd/genpwd.py index 60e508397..17c37efb3 100755 --- a/kolla_ansible/cmd/genpwd.py +++ b/kolla_ansible/cmd/genpwd.py @@ -61,9 +61,9 @@ def genpwd(passwords_file, length, uuid_keys, ssh_keys, blank_keys, for k, v in passwords.items(): if (k in ssh_keys and - (v is None - or v.get('public_key') is None - and v.get('private_key') is None)): + (v is None or + v.get('public_key') is None and + v.get('private_key') is None)): private_key, public_key = generate_RSA() passwords[k] = { 'private_key': private_key, @@ -98,10 +98,10 @@ commands = [flake8] show-source = True # NOTE: Default ignore list is *not* empty! -# TODO: Enable either W503 or W504: -# W503 line break before binary operator # W504 line break after binary operator -ignore = W503,W504 +# (W503 and W504 are incompatible and we need to choose one of them. +# Existing codes follows W503, so we disable W504.): +ignore = W504 exclude=.eggs,.git,.tox,doc [testenv:lower-constraints] |
