Эх сурвалжийг харах

Fix code readability and remove spaces between cells

Deben Oldert 6 жил өмнө
parent
commit
1dd799c980
1 өөрчлөгдсөн 3 нэмэгдсэн , 2 устгасан
  1. 3 2
      console.py

+ 3 - 2
console.py

@@ -51,7 +51,7 @@ def option_picker(question, options, objects=None, selected=None, quit=False, ta
             _space = '[{:' + str(column[1]) + '}]'
             header.append(_space.format(column[0]))
 
-        _header = ' '.join(header)
+        _header = ''.join(header)
         width = len(_header)
         output(color.Style.BRIGHT + _header)
         output(color.Style.BRIGHT + ('=' * width))
@@ -65,7 +65,8 @@ def option_picker(question, options, objects=None, selected=None, quit=False, ta
 
         if objects is not None and table is not None and len(objects) == len(table):
             for j in range(0, len(objects)):
-                _row += '[{' + str(objects[j]) + ':' + str(table[j][1]) + '.' + str(table[j][1]) + '}] '
+                _row += '[{{{name}:{size}.{size}}}]'.format(name=str(objects[j]), size=str(table[j][1]))
+                # _row += '[{' + str(objects[j]) + ':' + str(table[j][1]) + '.' + str(table[j][1]) + '}] '
 
             output(_row.format(__id__=str(i), x=option).strip())