File tree Expand file tree Collapse file tree 1 file changed +7
-15
lines changed
Expand file tree Collapse file tree 1 file changed +7
-15
lines changed Original file line number Diff line number Diff line change 2929 args .w = args .c = args .l = True
3030numbers = []
3131output = []
32-
32+ column_widths = []
3333for path in args .path :
3434 output_for_one_file = []
3535 if args .l or args .w :
6464
6565 num_cols = len (total_results ) - 1
6666 column_widths = [len (str (total_results [i ])) for i in range (num_cols )]
67-
68- for row in output :
69- line_parts = []
70- for i in range (num_cols ):
71- # Right-align with 1 space padding (like wc)
72- line_parts .append (str (row [i ]).rjust (column_widths [i ] + 7 ))
73- print ("" .join (line_parts ), row [- 1 ])
7467elif len (args .path ) == 1 :
7568 num_cols = len (output [0 ]) - 1
76- print (num_cols )
7769 column_widths = [len (str ([output [0 ][i ]])) for i in range (num_cols )]
78- for row in output :
79- line_parts = []
80- for i in range (num_cols ):
81- # Right-align with 1 space padding (like wc)
82- line_parts .append (str (row [i ]).rjust (column_widths [i ] + 6 ))
83- print ("" .join (line_parts ), row [- 1 ])
70+ for row in output :
71+ line_parts = []
72+ for i in range (num_cols ):
73+ # Right-align with 1 space padding (like wc)
74+ line_parts .append (str (row [i ]).rjust (column_widths [i ] + 6 ))
75+ print ("" .join (line_parts ), row [- 1 ])
You can’t perform that action at this time.
0 commit comments