A community-maintained Python framework for creating mathematical animations.
progress_bar flag to boolean
azarzadavilace7cecb95b7a
diff --git a/manim/default.cfg b/manim/default.cfgindex b46805078..13e90451b 100644--- a/manim/default.cfg+++ b/manim/default.cfg@@ -39,6 +39,9 @@ show_file_in_finder = False# -v, --verboseverbose = INFO+# --progress_bar+progress_bar = True+# --soundsound = Falsediff --git a/manim/utils/config_utils.py b/manim/utils/config_utils.pyindex 2e6f01ccb..ada0a3446 100644--- a/manim/utils/config_utils.py+++ b/manim/utils/config_utils.py@@ -133,9 +133,7 @@ def _parse_file_writer_config(config_parser, args):progress_bar_v = Falseprogress_bar = getattr(args, "progress_bar")if progress_bar is None:- progress_bar = default.get("progress_bar", None)- if progress_bar is not None:- progress_bar = True if progress_bar == "on" else False+ progress_bar = default.getboolean("progress_bar", None)fw_config["progress_bar"] = progress_bar_v if progress_bar is None else progress_barreturn fw_config@@ -333,12 +331,19 @@ def _parse_cli(arg_list, input=True):metavar="loglevel",choices=constants.VERBOSE_CHOICES,)++ def _str2bool(s):+ if s == "True":+ return True+ elif s == "False":+ return False+ else:+ raise argparse.ArgumentTypeError("True or False expected")parser.add_argument("--progress_bar",- type=str,+ type=_str2bool,help="Display the progress bar",- metavar="on/off",- choices=["on", "off"],+ metavar="True/False",)return parser.parse_args(arg_list)