From 5c0ba1872726929f8fffa15f418bd92829cf6ccf Mon Sep 17 00:00:00 2001 From: Xavier Weiss Date: Mon, 4 Nov 2024 20:48:14 +0100 Subject: [PATCH] Refact: Remove Allow_Shedding from dict repr of GridObject Signed-off-by: Xavier Weiss --- grid2op/Space/GridObjects.py | 5 ----- grid2op/tests/test_Observation.py | 1 - 2 files changed, 6 deletions(-) diff --git a/grid2op/Space/GridObjects.py b/grid2op/Space/GridObjects.py index 5d854318..a31f8b68 100644 --- a/grid2op/Space/GridObjects.py +++ b/grid2op/Space/GridObjects.py @@ -3931,8 +3931,6 @@ def _make_cls_dict(cls, res, as_list=True, copy_=True, _topo_vect_only=False): res["name_shunt"] = None res["shunt_to_subid"] = None - # Shedding - save_to_dict(res, cls, "allow_shedding", bool, copy_) if not _topo_vect_only: # all the attributes bellow are not needed for the "first call" @@ -4131,9 +4129,6 @@ def _make_cls_dict_extended(cls, res: CLS_AS_DICT_TYPING, as_list=True, copy_=Tr # n_busbar_per_sub res["n_busbar_per_sub"] = cls.n_busbar_per_sub - # Shedding - res["allow_shedding"] = cls.allow_shedding - # avoid further computation and save it if not as_list and not _topo_vect_only: cls._CLS_DICT_EXTENDED = res.copy() diff --git a/grid2op/tests/test_Observation.py b/grid2op/tests/test_Observation.py index ed8feb0a..dff0b205 100644 --- a/grid2op/tests/test_Observation.py +++ b/grid2op/tests/test_Observation.py @@ -299,7 +299,6 @@ def setUp(self): "alertable_line_ids": [], "assistant_warning_type": None, "_PATH_GRID_CLASSES": None, - "allow_shedding": False, } self.json_ref = {