pylint: 4 more
Change-Id: I4cc928d8212a5192927a994b4248f32fe05ca723
This commit is contained in:
parent
360c57118c
commit
9d37c88c8f
|
@ -6,19 +6,15 @@ jobs = 0
|
||||||
disable =
|
disable =
|
||||||
# TODO(ssbarnea): remove temporary skips adding during initial adoption:
|
# TODO(ssbarnea): remove temporary skips adding during initial adoption:
|
||||||
broad-except,
|
broad-except,
|
||||||
dangerous-default-value,
|
|
||||||
duplicate-code,
|
duplicate-code,
|
||||||
fixme,
|
fixme,
|
||||||
function-redefined,
|
|
||||||
global-statement,
|
global-statement,
|
||||||
inconsistent-return-statements,
|
|
||||||
invalid-name,
|
invalid-name,
|
||||||
line-too-long,
|
line-too-long,
|
||||||
missing-class-docstring,
|
missing-class-docstring,
|
||||||
missing-function-docstring,
|
missing-function-docstring,
|
||||||
missing-module-docstring,
|
missing-module-docstring,
|
||||||
no-member,
|
no-member,
|
||||||
no-self-use,
|
|
||||||
protected-access,
|
protected-access,
|
||||||
redefined-outer-name,
|
redefined-outer-name,
|
||||||
super-init-not-called,
|
super-init-not-called,
|
||||||
|
|
|
@ -141,6 +141,7 @@ def main():
|
||||||
if not cleaned:
|
if not cleaned:
|
||||||
cleaned.append('None')
|
cleaned.append('None')
|
||||||
info('%sRemoved queries:\n%s' % (prefix, '\n'.join(sorted(cleaned))))
|
info('%sRemoved queries:\n%s' % (prefix, '\n'.join(sorted(cleaned))))
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
@ -105,7 +105,6 @@ class FailEvent(object):
|
||||||
rev = None
|
rev = None
|
||||||
project = None
|
project = None
|
||||||
url = None
|
url = None
|
||||||
build_short_uuids = []
|
|
||||||
comment = None
|
comment = None
|
||||||
failed_jobs = []
|
failed_jobs = []
|
||||||
|
|
||||||
|
|
|
@ -117,10 +117,10 @@ class ResultSet(list):
|
||||||
(pyes goes way overboard with nesting, which is fine in the general
|
(pyes goes way overboard with nesting, which is fine in the general
|
||||||
case, but in the elastic_recheck case is just added complexity).
|
case, but in the elastic_recheck case is just added complexity).
|
||||||
"""
|
"""
|
||||||
def __init__(self, results={}):
|
def __init__(self, results=None):
|
||||||
self._results = results
|
self._results = results or {}
|
||||||
if 'hits' in results:
|
if 'hits' in self._results:
|
||||||
self._parse_hits(results['hits'])
|
self._parse_hits(self._results['hits'])
|
||||||
|
|
||||||
def _parse_hits(self, hits):
|
def _parse_hits(self, hits):
|
||||||
# why, oh why elastic search
|
# why, oh why elastic search
|
||||||
|
@ -139,6 +139,7 @@ class ResultSet(list):
|
||||||
return self._results['facets']['tag'][attr]
|
return self._results['facets']['tag'][attr]
|
||||||
if attr in self._results:
|
if attr in self._results:
|
||||||
return self._results[attr]
|
return self._results[attr]
|
||||||
|
raise AttributeError(attr)
|
||||||
|
|
||||||
|
|
||||||
class FacetSet(dict):
|
class FacetSet(dict):
|
||||||
|
@ -153,7 +154,8 @@ class FacetSet(dict):
|
||||||
|
|
||||||
Treat this basically like a dictionary (which it inherits from).
|
Treat this basically like a dictionary (which it inherits from).
|
||||||
"""
|
"""
|
||||||
def _histogram(self, data, facet, res=3600):
|
@staticmethod
|
||||||
|
def _histogram(data, facet, res=3600):
|
||||||
"""A preprocessor for data should we want to bucket it."""
|
"""A preprocessor for data should we want to bucket it."""
|
||||||
# NOTE(mriedem): We sometimes hit a case where the @timestamp attribute
|
# NOTE(mriedem): We sometimes hit a case where the @timestamp attribute
|
||||||
# is too large and ES won't return it. At some point we should probably
|
# is too large and ES won't return it. At some point we should probably
|
||||||
|
|
|
@ -118,7 +118,8 @@ class TestBotWithTestTools(tests.TestCase):
|
||||||
"gate-keystone-python27: unrecognized error")
|
"gate-keystone-python27: unrecognized error")
|
||||||
self.assertEqual(reference, msg)
|
self.assertEqual(reference, msg)
|
||||||
|
|
||||||
def fake_display(self, *args):
|
@staticmethod
|
||||||
|
def fake_display(*args):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def test_error_found(self):
|
def test_error_found(self):
|
||||||
|
|
Loading…
Reference in New Issue