refactor: Organize code to remove flake8 issues

This commit is contained in:
Cristian 2020-07-24 12:25:25 -05:00
parent f4c0616332
commit 6006b4f93b
24 changed files with 43 additions and 39 deletions

View file

@ -226,11 +226,11 @@ def ansi_to_html(text):
argsdict = match.groupdict()
if argsdict['arg_3'] is None:
if argsdict['arg_2'] is None:
bold, color = 0, argsdict['arg_1']
_, color = 0, argsdict['arg_1']
else:
bold, color = argsdict['arg_1'], argsdict['arg_2']
_, color = argsdict['arg_1'], argsdict['arg_2']
else:
bold, color = argsdict['arg_3'], argsdict['arg_2']
_, color = argsdict['arg_3'], argsdict['arg_2']
return TEMPLATE.format(COLOR_DICT[color][0])