From 623c70431280aba1841b2b0d2c438e685fc5d5ce Mon Sep 17 00:00:00 2001 From: ricolin Date: Sun, 15 Nov 2015 22:04:03 +0800 Subject: [PATCH] Enable pep8 H238 test Enable H238 old style class declaration, use new style (inherit from `object`) Change-Id: I4d11e398a008bcb1b22ecc0b6b2df41c1abae6d5 --- heatclient/tests/unit/fakes.py | 8 ++++---- heatclient/tests/unit/osc/fakes.py | 2 +- tox.ini | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/heatclient/tests/unit/fakes.py b/heatclient/tests/unit/fakes.py index 74ecf304..fca1ab99 100644 --- a/heatclient/tests/unit/fakes.py +++ b/heatclient/tests/unit/fakes.py @@ -211,23 +211,23 @@ def fake_headers(): 'User-Agent': 'python-heatclient'} -class FakeServiceCatalog(): +class FakeServiceCatalog(object): def url_for(self, endpoint_type, service_type): return 'http://192.168.1.5:8004/v1/f14b41234' -class FakeKeystone(): +class FakeKeystone(object): service_catalog = FakeServiceCatalog() def __init__(self, auth_token): self.auth_token = auth_token -class FakeRaw(): +class FakeRaw(object): version = 110 -class FakeHTTPResponse(): +class FakeHTTPResponse(object): version = 1.1 diff --git a/heatclient/tests/unit/osc/fakes.py b/heatclient/tests/unit/osc/fakes.py index 73865906..1fcd6e59 100644 --- a/heatclient/tests/unit/osc/fakes.py +++ b/heatclient/tests/unit/osc/fakes.py @@ -160,7 +160,7 @@ TEST_VERSIONS = { } -class FakeStdout: +class FakeStdout(object): def __init__(self): self.content = [] diff --git a/tox.ini b/tox.ini index 230ebfe7..b9ee36f5 100644 --- a/tox.ini +++ b/tox.ini @@ -42,7 +42,7 @@ commands= downloadcache = ~/cache/pip [flake8] -ignore = E123,E126,E128,E241,E265,E713,H202,H238 +ignore = E123,E126,E128,E241,E265,E713,H202 show-source = True exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build max-complexity=20