Fix E122,E126,E128 items in codebase
In the land of random cleanups, let more of the whitespace rules back in. Also explicitly exclude E125 because of the overreach, and leave E123 excluded because it creates some kind of odd artifacts in the current code (possibly clean it up later). Tox.ini adjusted with comments about the fact that what we are ignoring is there for a reason. Change-Id: I5636cb646d7898df71b715aa0e32a68ce279ee80
This commit is contained in:
parent
3a8721bb51
commit
a0be1593f5
@ -42,7 +42,8 @@ class TestQueries(tests.TestCase):
|
||||
for x in self.classifier.queries:
|
||||
print("Looking for bug: https://bugs.launchpad.net/bugs/%s"
|
||||
% x['bug'])
|
||||
self.assertTrue((self._is_valid_ElasticSearch_query(x) or
|
||||
self.assertTrue(
|
||||
(self._is_valid_ElasticSearch_query(x) or
|
||||
self._is_valid_launchpad_bug(x['bug'])),
|
||||
("Something is wrong with bug %s" % x['bug']))
|
||||
|
||||
|
@ -77,16 +77,22 @@ class TestClassifier(tests.TestCase):
|
||||
|
||||
def test_is_ready(self):
|
||||
self.stubs.Set(self.classifier.es, 'search', _fake_search)
|
||||
result = self.classifier._is_ready('49282', '3', 'BLAH http://logs.'
|
||||
'openstack.org/57/51057/1/gate/gate-tempest-devstack-vm-full'
|
||||
'/f8965ee')
|
||||
result = self.classifier._is_ready(
|
||||
'49282',
|
||||
'3',
|
||||
'BLAH http://logs.openstack.org/57/51057/1/gate/'
|
||||
'gate-tempest-devstack-vm-full/f8965ee'
|
||||
)
|
||||
self.assertTrue(result)
|
||||
|
||||
def test_classify(self):
|
||||
self.stubs.Set(self.classifier.es, 'search', _fake_search)
|
||||
self.stubs.Set(self.classifier, '_urls_match', _fake_urls_match)
|
||||
self.stubs.Set(self.classifier, '_is_ready', _fake_is_ready)
|
||||
bug_numbers = self.classifier.classify('47463', '3',
|
||||
bug_numbers = self.classifier.classify(
|
||||
'47463',
|
||||
'3',
|
||||
' blah http://logs.openstack.org/63/47463/3/gate/gate-tempest'
|
||||
'-devstack-vm-postgres-full/99bb8f6')
|
||||
'-devstack-vm-postgres-full/99bb8f6'
|
||||
)
|
||||
self.assertEqual(bug_numbers, [1234567])
|
||||
|
4
tox.ini
4
tox.ini
@ -29,6 +29,8 @@ commands = python setup.py testr --coverage --testr-args='{posargs}'
|
||||
|
||||
[flake8]
|
||||
# H803 Skipped on purpose
|
||||
# E125 Skipped because it's an overreach (and anti-emacs)
|
||||
# E123 Skipped because it decreases clarity in many cases
|
||||
|
||||
ignore = E123,E122,E126,E128,H803
|
||||
ignore = E123,E125,H803
|
||||
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|
||||
|
Loading…
x
Reference in New Issue
Block a user