Jelajahi Sumber

setup.py: fix same loop variables

lgtm:
Nested loops in which the target variable is the same for each loop make
the behavior of the loops difficult to understand.

(not really here, just wanted to get rid of lgtm warning)
Thomas Waldmann 7 tahun lalu
induk
melakukan
73e5ac4a2b
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      setup.py

+ 2 - 2
setup.py

@@ -368,12 +368,12 @@ class build_usage(Command):
                 # "+ 1" because we want a space between the cell contents and the delimiting "|" in the output
                 # "+ 1" because we want a space between the cell contents and the delimiting "|" in the output
                 column_widths[i] = max(column_widths[i], len(cells[i]) + 1)
                 column_widths[i] = max(column_widths[i], len(cells[i]) + 1)
 
 
-        for columns, *cells in rows:
+        for columns, *original_cells in rows:
             write_row_separator()
             write_row_separator()
             # If a cell contains newlines, then the row must be split up in individual rows
             # If a cell contains newlines, then the row must be split up in individual rows
             # where each cell contains no newline.
             # where each cell contains no newline.
             rowspanning_cells = []
             rowspanning_cells = []
-            original_cells = list(cells)
+            original_cells = list(original_cells)
             while any('\n' in cell for cell in original_cells):
             while any('\n' in cell for cell in original_cells):
                 cell_bloc = []
                 cell_bloc = []
                 for i, cell in enumerate(original_cells):
                 for i, cell in enumerate(original_cells):