ensure typing, remove unsued code

This commit is contained in:
robcaulk
2022-11-26 12:11:59 +01:00
parent 8dbfd2cacf
commit 81fd2e588f
5 changed files with 46 additions and 44 deletions

View File

@@ -195,7 +195,7 @@ As you begin to modify the strategy and the prediction model, you will quickly r
Users can override any functions from those parent classes. Here is an example
of a user customized `calculate_reward()` function.
"""
def calculate_reward(self, action):
def calculate_reward(self, action: int) -> float:
# first, penalize if the action is not valid
if not self._is_valid(action):
return -2