Skip to content

Commit

Permalink
refactor: raise NotImplementedError in abstract method (#75)
Browse files Browse the repository at this point in the history
Abstract methods should raise `NotImplementeError` when they require derived classes to override the method, or while the class is being developed to indicate that the real implementation still needs to be added.

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
  • Loading branch information
deepsource-autofix[bot] authored Mar 2, 2024
1 parent 75f3d21 commit 622acd0
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions martin_binance/strategy_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1638,71 +1638,71 @@ async def main(self, _symbol):
# region AbstractMethod
@abstractmethod
def restore_state_before_backtesting_ex(self, *args):
pass
raise NotImplementedError

@abstractmethod
def save_strategy_state(self, *args, **kwargs):
pass
raise NotImplementedError

@abstractmethod
def stop(self):
pass
raise NotImplementedError

@abstractmethod
def on_new_funds(self, *args):
pass
raise NotImplementedError

@abstractmethod
def on_cancel_order_error_string(self, *args):
pass
raise NotImplementedError

@abstractmethod
def on_cancel_order_success(self, *args, **kwargs):
pass
raise NotImplementedError

@abstractmethod
def on_place_order_error(self, *args):
pass
raise NotImplementedError

@abstractmethod
def on_place_order_success(self, *args):
pass
raise NotImplementedError

@abstractmethod
def on_balance_update_ex(self, *args):
pass
raise NotImplementedError

@abstractmethod
def on_order_update_ex(self, *args):
pass
raise NotImplementedError

@abstractmethod
def on_new_ticker(self, *args):
pass
raise NotImplementedError

@abstractmethod
def get_sum_profit(self):
pass
raise NotImplementedError

@abstractmethod
def get_free_assets(self, *args, **kwargs):
pass
raise NotImplementedError

@abstractmethod
def on_new_order_book(self, *args):
pass
raise NotImplementedError

@abstractmethod
def restore_strategy_state(self, *args, **kwargs):
pass
raise NotImplementedError

@abstractmethod
def start(self, *args):
pass
raise NotImplementedError

@abstractmethod
def init(self, *args, **kwargs):
pass
raise NotImplementedError

# endregion

Expand Down

0 comments on commit 622acd0

Please sign in to comment.