@@ -703,8 +703,9 @@ def save_report(
703
703
Function to save the backtest report to a file. If the
704
704
`save_in_memory_strategies` flag is set to True, the function
705
705
tries to get the strategy class defintion that are loaded in
706
- memory and save them to the output directory(this is usefull when experimenting in notebooks). Otherwise, it copies the
707
- strategy directory to the output directory.
706
+ memory and save them to the output directory(this is usefull
707
+ when experimenting in notebooks). Otherwise, it copies
708
+ the strategy directory to the output directory.
708
709
709
710
Args:
710
711
report: BacktestReport - The backtest report to save
@@ -749,7 +750,7 @@ def save_report(
749
750
)
750
751
751
752
if not os .path .exists (strategy_directory ) or \
752
- not os .path .isdir (strategy_directory ):
753
+ not os .path .isdir (strategy_directory ):
753
754
raise OperationalException (
754
755
"Default strategy directory 'strategies' does "
755
756
"not exist. If you have your strategies placed in "
@@ -761,7 +762,7 @@ def save_report(
761
762
762
763
# Check if the strategy directory exists
763
764
if not os .path .exists (strategy_directory ) or \
764
- not os .path .isdir (strategy_directory ):
765
+ not os .path .isdir (strategy_directory ):
765
766
raise OperationalException (
766
767
f"Strategy directory { strategy_directory } "
767
768
"does not "
@@ -925,7 +926,8 @@ def _save_strategy_class(self, strategy, output_directory):
925
926
collected_imports .append (" " .join (current_import ))
926
927
927
928
# Capture class definitions and functions
928
- if stripped_line .startswith ("class " ) or stripped_line .startswith ("def " ):
929
+ if stripped_line .startswith ("class " ) \
930
+ or stripped_line .startswith ("def " ):
929
931
class_started = True
930
932
931
933
if class_started :
0 commit comments