Skip to content

Commit aec5728

Browse files
fix some coding style issues
1 parent 4a30de0 commit aec5728

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

optibess_algorithm/output_calculator.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,7 @@ def sell_prices(self):
11521152
return self._sell_prices
11531153

11541154
@sell_prices.setter
1155-
def sell_prices(self, value: np.ndarray[Any, float]):
1155+
def sell_prices(self, value: np.ndarray[Any, np.dtype[np.float64]]):
11561156
if isinstance(value, np.ndarray) and is_real_numbers(value):
11571157
if value.shape != (YEAR_HOURS,) and value.shape != (self._project_hour_num,):
11581158
raise ValueError(f"Prices shape should be ({YEAR_HOURS},) or ({self._project_hour_num}, ), prices"
@@ -1172,7 +1172,7 @@ def buy_prices(self):
11721172
return self._buy_prices
11731173

11741174
@buy_prices.setter
1175-
def buy_prices(self, value: np.ndarray[Any, float]):
1175+
def buy_prices(self, value: np.ndarray[Any, np.dtype[np.float64]]):
11761176
if isinstance(value, np.ndarray) and is_real_numbers(value):
11771177
if value.shape != (YEAR_HOURS,) and value.shape != (self._project_hour_num, ):
11781178
raise ValueError(f"Prices shape should be ({YEAR_HOURS},) or ({self._project_hour_num}, ), prices"
@@ -1200,7 +1200,7 @@ def tariff_table(self, value: np.ndarray[Any, np.dtype[np.float64]]):
12001200
raise ValueError("Tariff table should be of shape (7, 12, 24)")
12011201
self._tariff_table = value
12021202

1203-
def _get_action_from_obs(self, obs: np.ndarray[Any, float]):
1203+
def _get_action_from_obs(self, obs: np.ndarray[Any, np.dtype[np.float64]]):
12041204
"""
12051205
get action(s) from model given an observation
12061206

optibess_algorithm/producers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def annual_deg(self, value):
369369
def start_year(self):
370370
return self._start_year
371371

372-
def _set_start_year(self, value: int):
372+
def _set_start_year(self, value):
373373
if value is None:
374374
self._start_year = datetime.datetime.today().year
375375
else:

0 commit comments

Comments
 (0)