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