env: track DVC_IGNORE_ISATTY as a env that we support (#6202)

This commit is contained in:
Saugat Pachhai
2021-06-21 05:35:39 +00:00
committed by GitHub
parent 9a7b6d2a1a
commit f2998630a3
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -6,3 +6,4 @@ DVCLIVE_PATH = "DVCLIVE_PATH"
DVCLIVE_SUMMARY = "DVCLIVE_SUMMARY"
DVCLIVE_HTML = "DVCLIVE_HTML"
DVCLIVE_RESUME = "DVCLIVE_RESUME"
DVC_IGNORE_ISATTY = "DVC_IGNORE_ISATTY"
+2 -1
View File
@@ -6,6 +6,7 @@ from threading import RLock
from tqdm import tqdm
from dvc.env import DVC_IGNORE_ISATTY
from dvc.utils import env2bool
logger = logging.getLogger(__name__)
@@ -77,7 +78,7 @@ class Tqdm(tqdm):
# auto-disable based on TTY
if (
not disable
and not env2bool("DVC_IGNORE_ISATTY")
and not env2bool(DVC_IGNORE_ISATTY)
and hasattr(file, "isatty")
):
disable = not file.isatty()