made simpler and removed unnecessary =1

This commit is contained in:
Noah Swerhun 2023-03-10 21:21:52 -06:00
parent 58c95e0a45
commit 5a28ec0b49

10
main.py
View file

@ -15,15 +15,15 @@ def print_bar():
case "right": case "right":
print("%{r}", end="") print("%{r}", end="")
# convert group to list so we can access subsequent items # convert group to list so we can access subsequent items
group = list(running_modules_dict[alignment].items()) group = list(running_modules_dict[alignment].values())
for index, module in enumerate(group): for index, module in enumerate(group):
print(module[1], end="") print(module, end="")
# IF module is not the last AND it has text # IF module is not the last AND it has text
if index != (len(group) - 1) and len(module[1]) > 0: if index != (len(group) - 1) and len(module) > 0:
# THEN only print seperator if the module is eventually followed # THEN only print seperator if the module is eventually followed
# by a module with text # by a module with text
for i in range(index + 1, len(group) - 1): for i in range(index + 1, len(group)):
if len(group[i][1]) > 0: if len(group[i]) > 0:
print(seperator, end="") print(seperator, end="")
break; break;