added comments to explain 668c8ce6

This commit is contained in:
Noah Swerhun 2023-03-10 21:14:30 -06:00
parent 668c8ce66e
commit 58c95e0a45

View file

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