diff --git a/python_ta/debug/accumulation_table.py b/python_ta/debug/accumulation_table.py index 5fcb1af6e..f964dcb19 100644 --- a/python_ta/debug/accumulation_table.py +++ b/python_ta/debug/accumulation_table.py @@ -94,7 +94,9 @@ def _record_iteration(self, frame: types.FrameType) -> None: for accumulator in self.loop_accumulators: if accumulator in frame.f_locals: self.loop_accumulators[accumulator].append(copy.copy(frame.f_locals[accumulator])) - elif len(list(self.loop_variables.values())[0]) == 1: # Checks if it's the first iteration + elif ( + len(list(self.loop_variables.values())[0]) == 1 + ): # Checks if it's the first iteration self.loop_accumulators[accumulator].append("N/A") else: raise NameError diff --git a/tests/test_debug/test_accumulation_table.py b/tests/test_debug/test_accumulation_table.py index 2fe526ba3..8081a8574 100644 --- a/tests/test_debug/test_accumulation_table.py +++ b/tests/test_debug/test_accumulation_table.py @@ -204,8 +204,8 @@ def test_loop_variable_initialized_in_loop() -> None: for number in [10, 20, 30, 40, 50, 60]: i = number - assert table.loop_variables == {'number': ['N/A', 10, 20, 30, 40, 50, 60]} - assert table.loop_accumulators == {'i': ['N/A', 10, 20, 30, 40, 50, 60]} + assert table.loop_variables == {"number": ["N/A", 10, 20, 30, 40, 50, 60]} + assert table.loop_accumulators == {"i": ["N/A", 10, 20, 30, 40, 50, 60]} def test_uninitialized_loop_accumulators() -> None: