From 5e5ef21f61f33a50c54b151cdf9081983394bc1b Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 21 Nov 2019 06:49:16 +0100 Subject: [PATCH] Align example imports --- freqtrade/templates/base_hyperopt.py.j2 | 7 ++++--- freqtrade/templates/base_strategy.py.j2 | 10 ++++++---- freqtrade/templates/sample_hyperopt.py | 9 +++++++-- freqtrade/templates/sample_hyperopt_advanced.py | 13 +++++++++---- freqtrade/templates/sample_strategy.py | 10 ++++++---- 5 files changed, 32 insertions(+), 17 deletions(-) diff --git a/freqtrade/templates/base_hyperopt.py.j2 b/freqtrade/templates/base_hyperopt.py.j2 index 75aedbf86..c0f4e3292 100644 --- a/freqtrade/templates/base_hyperopt.py.j2 +++ b/freqtrade/templates/base_hyperopt.py.j2 @@ -1,18 +1,19 @@ # pragma pylint: disable=missing-docstring, invalid-name, pointless-string-statement +# --- Do not remove these libs --- from functools import reduce from typing import Any, Callable, Dict, List -from pandas import DataFrame -import pandas as pd # noqa import numpy as np # noqa +import pandas as pd # noqa +from pandas import DataFrame from skopt.space import Categorical, Dimension, Integer, Real # noqa from freqtrade.optimize.hyperopt_interface import IHyperOpt # -------------------------------- # Add your lib to import here -import talib.abstract as ta +import talib.abstract as ta # noqa import freqtrade.vendor.qtpylib.indicators as qtpylib diff --git a/freqtrade/templates/base_strategy.py.j2 b/freqtrade/templates/base_strategy.py.j2 index 174c801ee..ccb8949e9 100644 --- a/freqtrade/templates/base_strategy.py.j2 +++ b/freqtrade/templates/base_strategy.py.j2 @@ -1,11 +1,13 @@ +# pragma pylint: disable=missing-docstring, invalid-name, pointless-string-statement # --- Do not remove these libs --- -from freqtrade.strategy.interface import IStrategy -from pandas import DataFrame -import pandas as pd # noqa import numpy as np # noqa -# -------------------------------- +import pandas as pd # noqa +from pandas import DataFrame +from freqtrade.strategy.interface import IStrategy + +# -------------------------------- # Add your lib to import here import talib.abstract as ta import freqtrade.vendor.qtpylib.indicators as qtpylib diff --git a/freqtrade/templates/sample_hyperopt.py b/freqtrade/templates/sample_hyperopt.py index 77afb2b98..f1dcb404a 100644 --- a/freqtrade/templates/sample_hyperopt.py +++ b/freqtrade/templates/sample_hyperopt.py @@ -1,16 +1,21 @@ # pragma pylint: disable=missing-docstring, invalid-name, pointless-string-statement +# --- Do not remove these libs --- from functools import reduce from typing import Any, Callable, Dict, List import numpy as np # noqa -import talib.abstract as ta # noqa +import pandas as pd # noqa from pandas import DataFrame from skopt.space import Categorical, Dimension, Integer, Real # noqa -import freqtrade.vendor.qtpylib.indicators as qtpylib from freqtrade.optimize.hyperopt_interface import IHyperOpt +# -------------------------------- +# Add your lib to import here +import talib.abstract as ta # noqa +import freqtrade.vendor.qtpylib.indicators as qtpylib + class SampleHyperOpt(IHyperOpt): """ diff --git a/freqtrade/templates/sample_hyperopt_advanced.py b/freqtrade/templates/sample_hyperopt_advanced.py index 7ababc16c..5634c21ea 100644 --- a/freqtrade/templates/sample_hyperopt_advanced.py +++ b/freqtrade/templates/sample_hyperopt_advanced.py @@ -1,16 +1,21 @@ # pragma pylint: disable=missing-docstring, invalid-name, pointless-string-statement +# --- Do not remove these libs --- from functools import reduce from typing import Any, Callable, Dict, List -import numpy as np # noqa F401 -import talib.abstract as ta +import numpy as np # noqa +import pandas as pd # noqa from pandas import DataFrame -from skopt.space import Categorical, Dimension, Integer, Real +from skopt.space import Categorical, Dimension, Integer, Real # noqa -import freqtrade.vendor.qtpylib.indicators as qtpylib from freqtrade.optimize.hyperopt_interface import IHyperOpt +# -------------------------------- +# Add your lib to import here +import talib.abstract as ta # noqa +import freqtrade.vendor.qtpylib.indicators as qtpylib + class AdvancedSampleHyperOpt(IHyperOpt): """ diff --git a/freqtrade/templates/sample_strategy.py b/freqtrade/templates/sample_strategy.py index 724e52156..38a45c1f2 100644 --- a/freqtrade/templates/sample_strategy.py +++ b/freqtrade/templates/sample_strategy.py @@ -1,14 +1,16 @@ +# pragma pylint: disable=missing-docstring, invalid-name, pointless-string-statement # --- Do not remove these libs --- -from freqtrade.strategy.interface import IStrategy +import numpy as np # noqa +import pandas as pd # noqa from pandas import DataFrame -# -------------------------------- +from freqtrade.strategy.interface import IStrategy + +# -------------------------------- # Add your lib to import here import talib.abstract as ta import freqtrade.vendor.qtpylib.indicators as qtpylib -import pandas as pd # noqa -import numpy as np # noqa # This class is a sample. Feel free to customize it.