From e887e91dd52faa4aa9a0ad772a945e9c2f04d850 Mon Sep 17 00:00:00 2001 From: Duc Truong Date: Thu, 10 Sep 2020 17:43:36 +0000 Subject: [PATCH] Fix Flake F811 for microversioned methods CI/CD jobs were switch to Ubuntu Focal (20.04) [1] which caused flake to flag F811 errors for methods with duplicate names. These methods are actually microversioned, so this should not be flagged. Adding noqa for F811 to avoid getting flagged by flake. [1] http://lists.openstack.org/pipermail/openstack-discuss/2020-September/017104.html Change-Id: I8e12127bf331f37d1a826ce7f0296183df2ba181 --- senlin/api/openstack/v1/webhooks.py | 2 +- senlin/tests/unit/api/common/test_wsgi.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/senlin/api/openstack/v1/webhooks.py b/senlin/api/openstack/v1/webhooks.py index 14d2c1018..b90420d22 100644 --- a/senlin/api/openstack/v1/webhooks.py +++ b/senlin/api/openstack/v1/webhooks.py @@ -50,7 +50,7 @@ class WebhookController(wsgi.Controller): @wsgi.Controller.api_version("1.10") # noqa @util.policy_enforce - def trigger(self, req, webhook_id, body=None): + def trigger(self, req, webhook_id, body=None): # noqa F811 obj = util.parse_request( 'WebhookTriggerRequestParamsInBody', req, {'identity': webhook_id, 'body': body}) diff --git a/senlin/tests/unit/api/common/test_wsgi.py b/senlin/tests/unit/api/common/test_wsgi.py index 0da83d00e..9884e9de9 100644 --- a/senlin/tests/unit/api/common/test_wsgi.py +++ b/senlin/tests/unit/api/common/test_wsgi.py @@ -345,7 +345,7 @@ class FakeController(wsgi.Controller): return {'score': 100} @wsgi.Controller.api_version('4.0') # noqa - def dance(self, req): + def dance(self, req): # noqa F811 return {'score': 60}