Fix pep8 F811 and F812
Fixes: manila/scheduler/simple.py:74:45: F812 list comprehension redefines 'service' from line 59 manila/api/v1/share_networks.py:147:41: F811 redefinition of unused 'network' from line 29 Do not blacklist these tests anymore. Partial-Bug: #1333290 Change-Id: Ibf3c170ada17a7af0708331331bc435942c3763b
This commit is contained in:
parent
fa24580fcf
commit
09b1917fe8
|
@ -26,7 +26,6 @@ from manila.api import xmlutil
|
|||
from manila.common import constants
|
||||
from manila.db import api as db_api
|
||||
from manila import exception
|
||||
from manila import network
|
||||
from manila.openstack.common import importutils
|
||||
from manila.openstack.common import log as logging
|
||||
from manila import policy
|
||||
|
|
|
@ -71,8 +71,8 @@ class SimpleScheduler(chance.ChanceScheduler):
|
|||
|
||||
results = db.service_get_all_share_sorted(elevated)
|
||||
if zone:
|
||||
results = [(service, gigs) for (service, gigs) in results
|
||||
if service['availability_zone'] == zone]
|
||||
results = [(service_g, gigs) for (service_g, gigs) in results
|
||||
if service_g['availability_zone'] == zone]
|
||||
for result in results:
|
||||
(service, share_gigabytes) = result
|
||||
if share_gigabytes + share_size > CONF.max_gigabytes:
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -42,6 +42,6 @@ commands = bash tools/lintstack.sh
|
|||
# TODO: These are not intentionally disabled, reenable when fixed:
|
||||
# H405: multi line docstring summary not separated with an empty line
|
||||
# H501: Do not use locals() for string formatting
|
||||
ignore = E12,H302,H303,H402,H404,H405,H501,H904,F401,F403,F811,F812,F841
|
||||
ignore = E12,H302,H303,H402,H404,H405,H501,H904,F401,F403,F841
|
||||
builtins = _
|
||||
exclude = .venv,.tox,dist,doc,openstack,*egg
|
||||
|
|
Loading…
Reference in New Issue