File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2022,10 +2022,12 @@ def parsed(self, raw):
20222022class HistoryItem (str ):
20232023 """Class used to represent an item in the History list.
20242024
2025- Thing wrapper around str class which adds a custom format for printing. It also keeps track of its index in the
2026- list as well as a lowercase representation of itself for convenience/efficiency.
2025+ Thin wrapper around str class which adds a custom format for printing. It
2026+ also keeps track of its index in the list as well as a lowercase
2027+ representation of itself for convenience/efficiency.
2028+
20272029 """
2028- listformat = '-------------------------[%d ]\n %s \n '
2030+ listformat = '-------------------------[{} ]\n {} \n '
20292031
20302032 # noinspection PyUnusedLocal
20312033 def __init__ (self , instr ):
@@ -2038,7 +2040,7 @@ def pr(self):
20382040
20392041 :return: str - pretty print string version of a HistoryItem
20402042 """
2041- return self .listformat % (self .idx , str (self ))
2043+ return self .listformat . format (self .idx , str (self ). rstrip ( ))
20422044
20432045
20442046class History (list ):
You can’t perform that action at this time.
0 commit comments