Add noqa markup to intentionally redefined methods

Testing has migrated to focal and python3.8;
and we get F811 errors on the microversioned
and hence redefined methods

E.g.:
F811 redefinition of unused 'list' from line 37
Closes-Bug: #1886298

Change-Id: I065b15f9b81036727ce9bdeae5f34c473d14d10c
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
This commit is contained in:
Goutham Pacha Ravi 2020-09-09 13:18:02 -07:00
parent afcedeb840
commit 399c0c4fb5
2 changed files with 10 additions and 10 deletions

View File

@ -42,7 +42,7 @@ class ShareReplicaExportLocationManager(base.ManagerWithFind):
"export_locations")
@api_versions.wraps(constants.REPLICA_GRADUATION_VERSION) # noqa
def list(self, share_replica, search_opts=None):
def list(self, share_replica, search_opts=None): # noqa F811
"""List all share replica export locations."""
share_replica_id = common_base.getid(share_replica)
return self._list(
@ -56,7 +56,7 @@ class ShareReplicaExportLocationManager(base.ManagerWithFind):
share_replica, export_location)
@api_versions.wraps(constants.REPLICA_GRADUATION_VERSION) # noqa
def get(self, share_replica, export_location):
def get(self, share_replica, export_location): # noqa F811
return self._get_replica_export_location(
share_replica, export_location)

View File

@ -57,7 +57,7 @@ class ShareReplicaManager(base.ManagerWithFind):
return self._get_share_replica(replica)
@api_versions.wraps(constants.REPLICA_GRADUATION_VERSION) # noqa
def get(self, replica):
def get(self, replica): # noqa F811
return self._get_share_replica(replica)
def _get_share_replica(self, replica):
@ -75,7 +75,7 @@ class ShareReplicaManager(base.ManagerWithFind):
return self._list_share_replicas(share=share, search_opts=search_opts)
@api_versions.wraps(constants.REPLICA_GRADUATION_VERSION) # noqa
def list(self, share=None, search_opts=None):
def list(self, share=None, search_opts=None): # noqa F811
return self._list_share_replicas(share=share, search_opts=search_opts)
def _list_share_replicas(self, share=None, search_opts=None):
@ -103,7 +103,7 @@ class ShareReplicaManager(base.ManagerWithFind):
return self._action('promote', replica)
@api_versions.wraps(constants.REPLICA_GRADUATION_VERSION) # noqa
def promote(self, replica):
def promote(self, replica): # noqa F811
"""Promote the provided replica.
:param replica: either replica object or its UUID.
@ -117,7 +117,7 @@ class ShareReplicaManager(base.ManagerWithFind):
share, availability_zone=availability_zone)
@api_versions.wraps(constants.REPLICA_GRADUATION_VERSION) # noqa
def create(self, share, availability_zone=None):
def create(self, share, availability_zone=None): # noqa F811
return self._create_share_replica(
share, availability_zone=availability_zone)
@ -150,7 +150,7 @@ class ShareReplicaManager(base.ManagerWithFind):
self._do_delete(replica, force=force)
@api_versions.wraps(constants.REPLICA_GRADUATION_VERSION) # noqa
def delete(self, replica, force=False):
def delete(self, replica, force=False): # noqa F811
"""Delete a replica.
:param replica: either replica object or its UUID.
@ -169,7 +169,7 @@ class ShareReplicaManager(base.ManagerWithFind):
return self._do_reset_state(replica, state, "reset_status")
@api_versions.wraps(constants.REPLICA_GRADUATION_VERSION) # noqa
def reset_state(self, replica, state):
def reset_state(self, replica, state): # noqa F811
"""Reset the 'status' attr of the replica.
:param replica: either replica object or its UUID.
@ -188,7 +188,7 @@ class ShareReplicaManager(base.ManagerWithFind):
return self._do_reset_state(replica, state, "reset_replica_state")
@api_versions.wraps(constants.REPLICA_GRADUATION_VERSION) # noqa
def reset_replica_state(self, replica, state):
def reset_replica_state(self, replica, state): # noqa F811
"""Reset the 'replica_state' attr of the replica.
:param replica: either replica object or its UUID.
@ -206,7 +206,7 @@ class ShareReplicaManager(base.ManagerWithFind):
return self._action('resync', replica)
@api_versions.wraps(constants.REPLICA_GRADUATION_VERSION) # noqa
def resync(self, replica):
def resync(self, replica): # noqa F811
"""Re-sync the provided replica.
:param replica: either replica object or its UUID.