diff --git a/magnum/api/auth.py b/magnum/api/auth.py index 09fbc1970a..0dbef6cc11 100644 --- a/magnum/api/auth.py +++ b/magnum/api/auth.py @@ -2,8 +2,6 @@ # # Copyright © 2012 New Dream Network, LLC (DreamHost) # -# Author: Doug Hellmann -# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at diff --git a/magnum/api/controllers/root.py b/magnum/api/controllers/root.py index 9121bdcaec..e69139ea05 100644 --- a/magnum/api/controllers/root.py +++ b/magnum/api/controllers/root.py @@ -2,8 +2,6 @@ # # Copyright © 2012 New Dream Network, LLC (DreamHost) # -# Author: Doug Hellmann -# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at diff --git a/magnum/api/hooks.py b/magnum/api/hooks.py index 405ac27813..b4f5bb2cf0 100644 --- a/magnum/api/hooks.py +++ b/magnum/api/hooks.py @@ -2,8 +2,6 @@ # # Copyright © 2012 New Dream Network, LLC (DreamHost) # -# Author: Doug Hellmann -# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at @@ -117,4 +115,4 @@ class NoExceptionTracebackHook(hooks.PecanHook): json_body['faultstring'] = faultsting.rstrip() # Replace the whole json. Cannot change original one beacause it's # generated on the fly. - state.response.json = json_body \ No newline at end of file + state.response.json = json_body diff --git a/magnum/api/middleware/parsable_error.py b/magnum/api/middleware/parsable_error.py index 4c2db67962..d98877d933 100644 --- a/magnum/api/middleware/parsable_error.py +++ b/magnum/api/middleware/parsable_error.py @@ -2,8 +2,6 @@ # # Copyright ? 2012 New Dream Network, LLC (DreamHost) # -# Author: Doug Hellmann -# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at @@ -88,4 +86,4 @@ class ParsableErrorMiddleware(object): state['headers'].append(('Content-Length', len(body[0]))) else: body = app_iter - return body \ No newline at end of file + return body diff --git a/magnum/base.py b/magnum/base.py index 34889d544c..1d9393a768 100644 --- a/magnum/base.py +++ b/magnum/base.py @@ -110,4 +110,4 @@ class Container(ContainerBase): @abc.abstractmethod def execute(self, cmd): - pass \ No newline at end of file + pass diff --git a/magnum/common/k8s_manifest.py b/magnum/common/k8s_manifest.py index f8fafa50b8..bd33590ebf 100644 --- a/magnum/common/k8s_manifest.py +++ b/magnum/common/k8s_manifest.py @@ -65,4 +65,4 @@ def parse(manifest_str): raise ValueError(_('The manifest is not a JSON object ' 'or YAML mapping.')) # TODO(yuanying): check manifest version - return manifest \ No newline at end of file + return manifest diff --git a/magnum/conductor/handlers/common/docker_client.py b/magnum/conductor/handlers/common/docker_client.py index 248ddbdb85..97bff04638 100644 --- a/magnum/conductor/handlers/common/docker_client.py +++ b/magnum/conductor/handlers/common/docker_client.py @@ -76,4 +76,4 @@ class DockerHTTPClient(client.Client): self.load_image(fh) def get_container_logs(self, docker_id): - return self.attach(docker_id, 1, 1, 0, 1) \ No newline at end of file + return self.attach(docker_id, 1, 1, 0, 1) diff --git a/magnum/objects/base.py b/magnum/objects/base.py index 1f23ffd26f..d198e6cae7 100644 --- a/magnum/objects/base.py +++ b/magnum/objects/base.py @@ -32,7 +32,7 @@ from magnum.openstack.common import versionutils LOG = logging.getLogger('object') -class NotSpecifiedSentinel: +class NotSpecifiedSentinel(object): pass diff --git a/magnum/tests/api/controllers/v1/test_node.py b/magnum/tests/api/controllers/v1/test_node.py index 4b33fb6248..377952d9f5 100644 --- a/magnum/tests/api/controllers/v1/test_node.py +++ b/magnum/tests/api/controllers/v1/test_node.py @@ -265,4 +265,4 @@ class TestDelete(api_base.FunctionalTest): response = self.delete('/nodes/%s' % uuid, expect_errors=True) self.assertEqual(404, response.status_int) self.assertEqual('application/json', response.content_type) - self.assertTrue(response.json['error_message']) \ No newline at end of file + self.assertTrue(response.json['error_message']) diff --git a/magnum/tests/api/controllers/v1/test_pod.py b/magnum/tests/api/controllers/v1/test_pod.py index 8a990a6917..1ffba8ad89 100644 --- a/magnum/tests/api/controllers/v1/test_pod.py +++ b/magnum/tests/api/controllers/v1/test_pod.py @@ -381,4 +381,4 @@ class TestDelete(api_base.FunctionalTest): response = self.delete('/pods/%s' % uuid, expect_errors=True) self.assertEqual(404, response.status_int) self.assertEqual('application/json', response.content_type) - self.assertTrue(response.json['error_message']) \ No newline at end of file + self.assertTrue(response.json['error_message']) diff --git a/magnum/tests/api/controllers/v1/test_service.py b/magnum/tests/api/controllers/v1/test_service.py index ad3ad77a14..99970d2f66 100644 --- a/magnum/tests/api/controllers/v1/test_service.py +++ b/magnum/tests/api/controllers/v1/test_service.py @@ -311,4 +311,4 @@ class TestDelete(api_base.FunctionalTest): response = self.delete('/services/%s' % uuid, expect_errors=True) self.assertEqual(404, response.status_int) self.assertEqual('application/json', response.content_type) - self.assertTrue(response.json['error_message']) \ No newline at end of file + self.assertTrue(response.json['error_message']) diff --git a/magnum/tests/api/test_hooks.py b/magnum/tests/api/test_hooks.py index f83ac5d263..1e51a14372 100644 --- a/magnum/tests/api/test_hooks.py +++ b/magnum/tests/api/test_hooks.py @@ -136,4 +136,4 @@ class TestNoExceptionTracebackHook(api_base.FunctionalTest): actual_msg = json.loads( response.json['error_message'])['faultstring'] - self.assertEqual(self.MSG_WITH_TRACE, actual_msg) \ No newline at end of file + self.assertEqual(self.MSG_WITH_TRACE, actual_msg) diff --git a/magnum/tests/api/utils.py b/magnum/tests/api/utils.py index 91b489c970..bf5e4b4953 100644 --- a/magnum/tests/api/utils.py +++ b/magnum/tests/api/utils.py @@ -91,4 +91,4 @@ def rc_post_data(**kw): def node_post_data(**kw): node = utils.get_test_node(**kw) internal = node_controller.NodePatchType.internal_attrs() - return remove_internal(node, internal) \ No newline at end of file + return remove_internal(node, internal) diff --git a/magnum/tests/common/test_exception.py b/magnum/tests/common/test_exception.py index cc8dcaaca0..edb0b0e9d4 100644 --- a/magnum/tests/common/test_exception.py +++ b/magnum/tests/common/test_exception.py @@ -193,4 +193,4 @@ class TestException(base.BaseTestCase): def test_NodeAssociated(self): self.assertRaises(exception.NodeAssociated, - lambda: self.raise_(exception.NodeAssociated())) \ No newline at end of file + lambda: self.raise_(exception.NodeAssociated())) diff --git a/magnum/tests/common/test_k8s_manifest.py b/magnum/tests/common/test_k8s_manifest.py index 15e52bd873..77b009e3d3 100644 --- a/magnum/tests/common/test_k8s_manifest.py +++ b/magnum/tests/common/test_k8s_manifest.py @@ -56,4 +56,4 @@ class K8sManifestTestCase(base.TestCase): def test_parse_invalid_value(self): invalid_str = 'aoa89**' - self.assertRaises(ValueError, k8s_manifest.parse, invalid_str) \ No newline at end of file + self.assertRaises(ValueError, k8s_manifest.parse, invalid_str) diff --git a/magnum/tests/common/test_safeutils.py b/magnum/tests/common/test_safeutils.py index 1af8fc6a6e..89e45d2411 100644 --- a/magnum/tests/common/test_safeutils.py +++ b/magnum/tests/common/test_safeutils.py @@ -96,4 +96,4 @@ class GetCallArgsTestCase(base.BaseTestCase): self.assertIn('red', callargs) self.assertEqual(3, callargs['red']) self.assertIn('blue', callargs) - self.assertIsNone(callargs['blue']) \ No newline at end of file + self.assertIsNone(callargs['blue']) diff --git a/magnum/tests/common/test_urlfetch.py b/magnum/tests/common/test_urlfetch.py index 5f1db1edef..ca7eed4417 100644 --- a/magnum/tests/common/test_urlfetch.py +++ b/magnum/tests/common/test_urlfetch.py @@ -52,4 +52,4 @@ class TestUrlFetch(base.BaseTestCase): self.assertRaises(urlfetch.URLFetchError, urlfetch.get, - 'http://example.com') \ No newline at end of file + 'http://example.com') diff --git a/magnum/tests/common/test_utils.py b/magnum/tests/common/test_utils.py index f8e18cafd7..1932128135 100644 --- a/magnum/tests/common/test_utils.py +++ b/magnum/tests/common/test_utils.py @@ -498,4 +498,4 @@ class TempFilesTestCase(base.TestCase): tempdir_created = tempdir rmtree_mock.assert_called_once_with(tempdir_created) - self.assertTrue(log_mock.error.called) \ No newline at end of file + self.assertTrue(log_mock.error.called) diff --git a/magnum/tests/conductor/handlers/common/test_kube_utils.py b/magnum/tests/conductor/handlers/common/test_kube_utils.py index b3957318e6..a9453baa53 100644 --- a/magnum/tests/conductor/handlers/common/test_kube_utils.py +++ b/magnum/tests/conductor/handlers/common/test_kube_utils.py @@ -141,4 +141,4 @@ class TestKubeUtils(base.BaseTestCase): mock_file.write.assert_called_once_with(expected_data) mock_k8s_update.assert_called_once_with(expected_master_address, - expected_filename) \ No newline at end of file + expected_filename) diff --git a/magnum/tests/fakes.py b/magnum/tests/fakes.py index 1223e09fac..b9615a826e 100644 --- a/magnum/tests/fakes.py +++ b/magnum/tests/fakes.py @@ -54,7 +54,7 @@ class FakePecanResponse(mock.Mock): self.status = None -class FakeApp: +class FakeApp(object): pass diff --git a/magnum/tests/objects/utils.py b/magnum/tests/objects/utils.py index e771406d4a..29142e746f 100644 --- a/magnum/tests/objects/utils.py +++ b/magnum/tests/objects/utils.py @@ -177,4 +177,4 @@ def create_test_node(ctxt, **kw): """ node = get_test_node(ctxt, **kw) node.create() - return node \ No newline at end of file + return node diff --git a/tox.ini b/tox.ini index 83fdbf9f90..c21b2cdafc 100644 --- a/tox.ini +++ b/tox.ini @@ -40,7 +40,6 @@ commands = # The rest of the ignores are TODOs # New from hacking 0.9: E129, E131, H407, H405, H904 # E251 Skipped due to https://github.com/jcrocholl/pep8/issues/301 -# TODO(dims): Fix temporarily ignored H105, H238, W292 -ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H302,H105,H238,H405,H803,H904,E711,W292 +ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H302,H405,H803,H904,E711 exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools