diff --git a/gamestonk_terminal/feature_flags.py b/gamestonk_terminal/feature_flags.py index 6aafa2a0ffb..c96db4a1e7c 100755 --- a/gamestonk_terminal/feature_flags.py +++ b/gamestonk_terminal/feature_flags.py @@ -1,16 +1,23 @@ import os -USE_COLOR = os.getenv("GTFF_USE_COLOR").lower() not in ["false", "0"] or True -USE_FLAIR = os.getenv("GTFF_USE_FLAIR") or "stars" -USE_ION = os.getenv("GTFF_USE_ION").lower() not in ["false", "0"] or True -USE_PROMPT_TOOLKIT = ( - os.getenv("GTFF_USE_PROMPT_TOOLKIT").lower() not in ["false", "0"] or False -) +# env vars are strings not booleans +# check for "false" or "0" +# any other value is true (including empty string) + +USE_COLOR = os.getenv("GTFF_USE_COLOR", "true").lower() not in ["false", "0"] +USE_FLAIR = os.getenv("GTFF_USE_FLAIR", "stars") +USE_ION = os.getenv("GTFF_USE_ION", "true").lower() not in ["false", "0"] +USE_PROMPT_TOOLKIT = os.getenv("GTFF_USE_PROMPT_TOOLKIT", "false").lower() not in [ + "false", + "0", +] + # Enable Prediction features -ENABLE_PREDICT = os.getenv("GTFF_ENABLE_PREDICT").lower() not in ["false", "0"] or False +ENABLE_PREDICT = os.getenv("GTFF_ENABLE_PREDICT", "false").lower() not in ["false", "0"] # Enable plot autoscaling -USE_PLOT_AUTOSCALING = ( - os.getenv("GTFF_USE_PLOT_AUTOSCALING").lower() not in ["false", "0"] or False -) +USE_PLOT_AUTOSCALING = os.getenv("GTFF_USE_PLOT_AUTOSCALING", "false").lower() not in [ + "false", + "0", +]