Merge "pylint fixes"
This commit is contained in:
commit
bbd3a2f2d5
@ -21,9 +21,6 @@ disable =
|
||||
missing-class-docstring,
|
||||
missing-function-docstring,
|
||||
missing-module-docstring,
|
||||
no-else-break,
|
||||
no-else-raise,
|
||||
no-else-return,
|
||||
no-member,
|
||||
no-self-use,
|
||||
protected-access,
|
||||
|
@ -140,7 +140,7 @@ class RecheckWatch(threading.Thread):
|
||||
if channel in self.channel_config.projects['all']:
|
||||
display = True
|
||||
break
|
||||
elif project in self.channel_config.projects:
|
||||
if project in self.channel_config.projects:
|
||||
if channel in self.channel_config.projects[project]:
|
||||
display = True
|
||||
break
|
||||
|
@ -121,8 +121,7 @@ def _status_count(results):
|
||||
def _failure_count(hits):
|
||||
if "FAILURE" in hits:
|
||||
return hits["FAILURE"]
|
||||
else:
|
||||
return 0
|
||||
return 0
|
||||
|
||||
|
||||
def _failed_jobs(results):
|
||||
|
@ -269,8 +269,7 @@ def _status_count(results):
|
||||
def _failure_count(hits):
|
||||
if "FAILURE" in hits:
|
||||
return hits["FAILURE"]
|
||||
else:
|
||||
return 0
|
||||
return 0
|
||||
|
||||
|
||||
def _failed_jobs(results):
|
||||
|
@ -145,7 +145,7 @@ class FailEvent(object):
|
||||
return None
|
||||
bug_map = {}
|
||||
for job in self.failed_jobs:
|
||||
if len(job.bugs) is 0:
|
||||
if len(job.bugs) == 0:
|
||||
bug_map[job.name] = None
|
||||
else:
|
||||
bug_map[job.name] = ' '.join(self.bug_urls(job.bugs))
|
||||
@ -161,7 +161,7 @@ class FailEvent(object):
|
||||
if self.get_all_bugs() is None:
|
||||
return True
|
||||
for job in self.failed_jobs:
|
||||
if len(job.bugs) is 0:
|
||||
if len(job.bugs) == 0:
|
||||
return False
|
||||
return True
|
||||
|
||||
@ -181,7 +181,7 @@ class FailEvent(object):
|
||||
bugs = set([])
|
||||
for job in self.failed_jobs:
|
||||
bugs |= set(job.bugs)
|
||||
if len(bugs) is 0:
|
||||
if len(bugs) == 0:
|
||||
return None
|
||||
return list(bugs)
|
||||
|
||||
@ -239,9 +239,8 @@ class Stream(object):
|
||||
msg = ("Console logs not ready for %s %s,%s,%s" %
|
||||
(name, change, patch, build_short_uuid))
|
||||
raise ConsoleNotReady(msg)
|
||||
else:
|
||||
self.log.debug("Console ready for %s %s,%s,%s" %
|
||||
(name, change, patch, build_short_uuid))
|
||||
self.log.debug("Console ready for %s %s,%s,%s" %
|
||||
(name, change, patch, build_short_uuid))
|
||||
|
||||
def _has_required_files(self, change, patch, name, build_short_uuid):
|
||||
query = qb.files_ready(change, patch, name, build_short_uuid)
|
||||
|
@ -169,8 +169,7 @@ class FacetSet(dict):
|
||||
epoch = datetime.datetime.fromtimestamp(0, pytz.UTC)
|
||||
pos = int(((ts - epoch).total_seconds()) * 1000)
|
||||
return pos
|
||||
else:
|
||||
return data
|
||||
return data
|
||||
|
||||
def detect_facets(self, results, facets, res=3600):
|
||||
if len(facets) > 0:
|
||||
|
@ -32,8 +32,7 @@ class Gerrit(object):
|
||||
def getEvent(self):
|
||||
if len(self.events) > 0:
|
||||
return self.events.pop()
|
||||
else:
|
||||
raise GerritDone()
|
||||
raise GerritDone()
|
||||
|
||||
def review(self, project, name, msg):
|
||||
self.reviews.append({'project': project, 'name': name, 'msg': msg})
|
||||
|
Loading…
x
Reference in New Issue
Block a user