From 958a666ebd21b10e7943b592e90403cc40779c1c Mon Sep 17 00:00:00 2001 From: Matthew Andres Moreno Date: Thu, 28 Dec 2023 13:57:09 -0500 Subject: [PATCH] Fixup DRAFTMODE conventions --- teeplot/teeplot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/teeplot/teeplot.py b/teeplot/teeplot.py index fb153c7..9345404 100644 --- a/teeplot/teeplot.py +++ b/teeplot/teeplot.py @@ -16,7 +16,7 @@ def _is_running_on_ci() -> bool: ci_envs = ['CI', 'TRAVIS', 'GITHUB_ACTIONS', 'GITLAB_CI', 'JENKINS_URL'] return any(env in os.environ for env in ci_envs) -draft_mode: bool = False +draftmode: bool = False oncollision: typing.Literal["error", "fix", "ignore", "warn"] = os.environ.get("TEEPLOT_ONCOLLISION", "warn").lower() if not oncollision in ("error", "fix", "ignore", "warn"): @@ -119,8 +119,8 @@ def tee( teeplot_save = set(filter(formats.__getitem__, formats)) elif ( teeplot_save is False - or "TEEPLOT_DRAFT_MODE" in os.environ - or draft_mode + or strtobool(os.environ.get("TEEPLOT_DRAFTMODE", "F")) + or draftmode ): # remove all outputs teeplot_save = set()