Browse Source

[goal] Prepare pep8 testing for Ubuntu Focal

As per victoria cycle testing runtime and community goal,
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).

Add noqa doe C901 and F811 pep8 for Focal, failure can be
seen in - https://review.opendev.org/#/c/743130

Depends-On: https://review.opendev.org/#/c/738328/

Change-Id: I95fa40551d842ce652ab937b8848c64f09a3e131
Story: #2007865
Task: #40190
tags/11.0.0.0rc1^0
Sharma-Ritika 2 weeks ago
parent
commit
2a61e7dc1f
5 changed files with 11 additions and 11 deletions
  1. +4
    -4
      magnum/api/controllers/v1/bay.py
  2. +1
    -1
      magnum/api/controllers/v1/cluster.py
  3. +1
    -1
      magnum/api/controllers/v1/cluster_template.py
  4. +1
    -1
      magnum/common/cert_manager/local_cert_manager.py
  5. +4
    -4
      magnum/tests/unit/api/controllers/test_base.py

+ 4
- 4
magnum/api/controllers/v1/bay.py View File

@@ -441,7 +441,7 @@ class BaysController(base.Controller):

@base.Controller.api_version("1.2") # noqa
@expose.expose(BayID, body=Bay, status_code=202)
def post(self, bay):
def post(self, bay): # noqa
"""Create a new bay.

:param bay: a bay within the request body.
@@ -513,7 +513,7 @@ class BaysController(base.Controller):
@wsme.validate(types.uuid, [BayPatchType])
@expose.expose(BayID, types.uuid_or_name, body=[BayPatchType],
status_code=202)
def patch(self, bay_ident, patch):
def patch(self, bay_ident, patch): # noqa
"""Update an existing bay.

:param bay_ident: UUID or logical name of a bay.
@@ -527,7 +527,7 @@ class BaysController(base.Controller):
@wsme.validate(types.uuid, bool, [BayPatchType])
@expose.expose(BayID, types.uuid_or_name, types.boolean,
body=[BayPatchType], status_code=202)
def patch(self, bay_ident, rollback=False, patch=None):
def patch(self, bay_ident, rollback=False, patch=None): # noqa
"""Update an existing bay.

:param bay_ident: UUID or logical name of a bay.
@@ -585,7 +585,7 @@ class BaysController(base.Controller):

@base.Controller.api_version("1.2") # noqa
@expose.expose(None, types.uuid_or_name, status_code=204)
def delete(self, bay_ident):
def delete(self, bay_ident): # noqa
"""Delete a bay.

:param bay_ident: UUID of a bay or logical name of the bay.


+ 1
- 1
magnum/api/controllers/v1/cluster.py View File

@@ -594,7 +594,7 @@ class ClustersController(base.Controller):
@wsme.validate(types.uuid, bool, [ClusterPatchType])
@expose.expose(ClusterID, types.uuid_or_name, types.boolean,
body=[ClusterPatchType], status_code=202)
def patch(self, cluster_ident, rollback=False, patch=None):
def patch(self, cluster_ident, rollback=False, patch=None): # noqa
"""Update an existing Cluster.

:param cluster_ident: UUID or logical name of a cluster.


+ 1
- 1
magnum/api/controllers/v1/cluster_template.py View File

@@ -437,7 +437,7 @@ class ClusterTemplatesController(base.Controller):
body=[ClusterTemplatePatchType])
@validation.enforce_network_driver_types_update()
@validation.enforce_volume_driver_types_update()
def patch(self, cluster_template_ident, patch):
def patch(self, cluster_template_ident, patch): # noqa
"""Update an existing ClusterTemplate.

:param cluster_template_ident: UUID or logic name of a


+ 1
- 1
magnum/common/cert_manager/local_cert_manager.py View File

@@ -104,7 +104,7 @@ class CertManager(cert_manager.CertManager):
return cert_ref

@staticmethod # noqa: C901
def get_cert(cert_ref, **kwargs):
def get_cert(cert_ref, **kwargs): # noqa: C901
"""Retrieves the specified cert.

:param cert_ref: the UUID of the cert to retrieve


+ 4
- 4
magnum/tests/unit/api/controllers/test_base.py View File

@@ -325,7 +325,7 @@ class TestController(test_base.TestCase):
return 'API1_1.0_1.1'

@base.Controller.api_version('1.2', '1.3') # noqa
def testapi1(self):
def testapi1(self): # noqa
return 'API1_1.2_1.3'

@base.Controller.api_version('2.1', '2.2')
@@ -333,7 +333,7 @@ class TestController(test_base.TestCase):
return 'API2_2.1_2.2'

@base.Controller.api_version('1.0', '2.0') # noqa
def testapi2(self):
def testapi2(self): # noqa
return 'API2_1.0_2.0'

controller = MyController()
@@ -376,7 +376,7 @@ class TestController(test_base.TestCase):
return 'API1_1.0_1.1'

@base.Controller.api_version('1.2', '1.3') # noqa
def testapi1(self):
def testapi1(self): # noqa
return 'API1_1.2_1.3'

controller = MyController()
@@ -398,7 +398,7 @@ class TestController(test_base.TestCase):
return 'API1_1.0_1.1'

@base.Controller.api_version('1.3', '1.4') # noqa
def testapi1(self):
def testapi1(self): # noqa
return 'API1_1.3_1.4'

controller = MyController()


Loading…
Cancel
Save