Shorten the travis IDs

This commit is contained in:
Joe Rickerby
2020-11-13 16:46:58 +00:00
parent 8b8d6d749c
commit 931f8e106e
+7 -7
View File
@@ -125,14 +125,14 @@ class Logger:
Travis doesn't like fold groups identifiers that have spaces in. This Travis doesn't like fold groups identifiers that have spaces in. This
method converts them to ascii identifiers method converts them to ascii identifiers
''' '''
# whitespace to dashes # whitespace to underscores
identifier = re.sub(r'\s+', '-', name) identifier = re.sub(r'\s+', '_', name)
# remove non-alphanum # remove non-alphanum
identifier = re.sub(r'[^A-Za-z\d]+', r'', identifier) identifier = re.sub(r'[^A-Za-z\d_]+', '', identifier)
# trim dashes # trim underscores
identifier = identifier.strip('-') identifier = identifier.strip('_')
# lowercase # lowercase, shorten
return identifier.lower() return identifier.lower()[:20]
@property @property
def colors(self): def colors(self):