Sbozzolo / kuibit

Consider removing the commented out code block PY-W0069
Anti-pattern
Major
9 occurrences in this check
Consider removing the commented out code block
1197    #     for horizon_number in self.available_horizons:
1198    #         yield self[horizon_number]
1199
1200    # def __len__(self):1201    #     return len(self.available_horizons)
Consider removing the commented out code block
1193    #
1194    # Once that is done, implement the following features.
1195
1196    # def __iter__(self):1197    #     for horizon_number in self.available_horizons:
1198    #         yield self[horizon_number]
1199
Consider removing the commented out code block
 570    #         [self.read_on_grid(i, grid).data for i in iterations]
 571    #     )
 572
 573    #     new_x0 = [times[0]] + list(grid.x0) 574    #     new_dx = [dt] + list(grid.dx)
 575
 576    #     return grid_data.UniformGridData.from_grid_structure(
Consider removing the commented out code block
 566    #     if abs(np.diff(times).max() - dt).max() > dt * 1e-5:
 567    #         raise RuntimeError("Timestep not constant enough")
 568
 569    #     data = np.asarray( 570    #         [self.read_on_grid(i, grid).data for i in iterations]
 571    #     )
 572
Consider removing the commented out code block
 559    #     ]
 560    #     times = [self.time_at_iteration(i) for i in iterations]
 561
 562    #     dt = np.diff(times).min() 563    #     if dt <= 0:
 564    #         raise RuntimeError("Non-positive timesteps detected.")
 565    #     #
Consider removing the commented out code block
 554    #     if read_every is None:
 555    #         read_every = np.diff(iterations).max()
 556
 557    #     iterations = [ 558    #         i for i in iterations if ((i - iterations[0]) % read_every == 0)
 559    #     ]
 560    #     times = [self.time_at_iteration(i) for i in iterations]
Consider removing the commented out code block
 546    #     """
 547    #     # TODO: IMPLEMENT THIS
 548
 549    #     iterations = self.available_iterations 550    #     if min_iteration is not None:
 551    #         iterations = iterations[iterations >= min_iteration]
 552    #     if max_iteration is not None:
Consider removing the commented out code block
 543    #     as RegularGridData in which the first index is the time and the other indices
 544    #     are the spatial indices of grid.
 545
 546    #     """ 547    #     # TODO: IMPLEMENT THIS
 548
 549    #     iterations = self.available_iterations
Consider removing the commented out code block
 531            grid, resample=resample
 532        )
 533
 534    # def read_evolution_on_grid( 535    #     self,
 536    #     grid,
 537    #     read_every=None,