gitlab module: use py3.get_color_names_list helper
@@ -105,7 +105,7 @@ class Py3status:
self.url['single_project'] += '/?statistics=true'
# init placeholders
- self.init = {'thresholds': []}
+ self.init = {'thresholds': self.py3.get_color_names_list(self.format)}
placeholders = self.py3.get_placeholders_list(self.format)
for x in ['open_merge_requests_count', 'todos_count', 'pipelines_status']:
self.init[x] = x in placeholders
@@ -113,10 +113,6 @@ class Py3status:
placeholders.remove(x)
self.init['single_project'] = bool(placeholders)
- # partial future helper code
- for x in self.format.replace('&', ' ').split('color=')[1::1]:
- self.init['thresholds'].append(x.split()[0])
-
def _get_data(self, url):
try:
return self.py3.request(
