Skip to content

Commit

Permalink
fix an non issue spotted by sonarcube [skip ci]
Browse files Browse the repository at this point in the history
Signed-off-by: DONNOT Benjamin <benjamin.donnot@rte-france.com>
  • Loading branch information
BDonnot committed Nov 8, 2024
1 parent ccdc626 commit 7acf066
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions grid2op/Chronics/fromMultiEpisodeData.py
Original file line number Diff line number Diff line change
@@ -123,6 +123,7 @@ def __init__(self,
self._path = path
self._chunk_size = chunk_size
self._list_perfect_forecasts = list_perfect_forecasts
self._input_li_ep_data = li_ep_data
if self._caching:
self.li_ep_data = [FromOneEpisodeData(path,
ep_data=el,
@@ -131,12 +132,10 @@ def __init__(self,
chunk_size=chunk_size,
list_perfect_forecasts=list_perfect_forecasts,
start_datetime=start_datetime)
for el in li_ep_data
]
self._input_li_ep_data = None
for el in li_ep_data
]
else:
self.li_ep_data = [None for el in li_ep_data]
self._input_li_ep_data = li_ep_data
self.li_ep_data = [None for _ in li_ep_data]
self._prev_cache_id = len(self.li_ep_data) - 1
self.data = self.li_ep_data[self._prev_cache_id]
if self.data is None:

0 comments on commit 7acf066

Please sign in to comment.