From a6b5ab31913dcf8186abfe3bb64130e79069f7ed Mon Sep 17 00:00:00 2001 From: Felipe Fernandes Date: Thu, 11 Mar 2021 19:33:37 -0300 Subject: [PATCH] fix and update the doc comment --- user_data/hyperopts/AverageHyperopt.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/user_data/hyperopts/AverageHyperopt.py b/user_data/hyperopts/AverageHyperopt.py index 2a37995..1c4fb23 100644 --- a/user_data/hyperopts/AverageHyperopt.py +++ b/user_data/hyperopts/AverageHyperopt.py @@ -70,7 +70,11 @@ class AverageHyperopt(IHyperOpt): buyTriggerList = [] for short in range(shortRangeBegin, shortRangeEnd): for medium in range(mediumRangeBegin, mediumRangeEnd): - # The output will be (short, long) + """ + The output will be '{short}-{long}' so we can split it on the trigger + this will prevent an error on scikit-optimize not accepting tuples as + first argument to Categorical + """ buyTriggerList.append( '{}-{}'.format(short, medium) ) @@ -116,7 +120,11 @@ class AverageHyperopt(IHyperOpt): sellTriggerList = [] for short in range(shortRangeBegin, shortRangeEnd): for medium in range(mediumRangeBegin, mediumRangeEnd): - # The output will be (short, long) + """ + The output will be '{short}-{long}' so we can split it on the trigger + this will prevent an error on scikit-optimize not accepting tuples as + first argument to Categorical + """ sellTriggerList.append( '{}-{}'.format(short, medium) )