Enable F811, F821

F811 is a little noisy with api_versions.wraps()
decorated methods, but opting to disable it in these
cases seems better than missing problems in the rest
of the code.

Change-Id: I9c46938ab2a442e55f96b5ab6c119c4475afaecd
This commit is contained in:
Eric Harney 2017-08-23 14:59:08 -04:00
parent e3e2f4d397
commit 74457db9ae
5 changed files with 7 additions and 7 deletions

@ -26,7 +26,7 @@ def do_fake_action():
return "fake_action 3.0 to 3.1"
@api_versions.wraps("3.2", "3.3")
@api_versions.wraps("3.2", "3.3") # noqa: F811
def do_fake_action():
return "fake_action 3.2 to 3.3"

@ -72,7 +72,7 @@ class FakeManagerWithApi(base.Manager):
def return_api_version(self):
return '3.1'
@api_versions.wraps('3.2')
@api_versions.wraps('3.2') # noqa: F811
def return_api_version(self):
return '3.2'

@ -51,7 +51,7 @@ class MessageManager(base.ManagerWithFind):
url = self._build_list_url(resource_type, detailed=False)
return self._list(url, resource_type)
@api_versions.wraps('3.5')
@api_versions.wraps('3.5') # noqa: F811
def list(self, search_opts=None, marker=None, limit=None, sort=None):
"""Lists all messages.

@ -147,7 +147,7 @@ class VolumeManager(volumes.VolumeManager):
return common_base.ListWithMeta([], response_list)
@api_versions.wraps("3.15")
@api_versions.wraps("3.15") # noqa: F811
def delete_metadata(self, volume, keys):
"""Delete specified keys from volumes metadata.
@ -178,7 +178,7 @@ class VolumeManager(volumes.VolumeManager):
'container_format': container_format,
'disk_format': disk_format})
@api_versions.wraps("3.1")
@api_versions.wraps("3.1") # noqa: F811
def upload_to_image(self, volume, force, image_name, container_format,
disk_format, visibility, protected):
"""Upload volume to image service as image.
@ -211,7 +211,7 @@ class VolumeManager(volumes.VolumeManager):
return self._get('/scheduler-stats/get_pools%s' % query_string, None)
@api_versions.wraps("3.33")
@api_versions.wraps("3.33") # noqa: F811
def get_pools(self, detail, search_opts):
"""Show pool information for backends."""
# pylint: disable=function-redefined

@ -57,5 +57,5 @@ passenv = OS_*
[flake8]
show-source = True
ignore = F811,F821,H404,H405,E122,E123,E128,E251
ignore = H404,H405,E122,E123,E128,E251
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build