fix(telemetry): make python identity env={} bypass os.environ and unset CI in tests

This commit is contained in:
Andrey Avtomonov 2026-05-22 17:59:11 +02:00
parent cdcadca1e1
commit 14431c01ee
4 changed files with 10 additions and 4 deletions

View file

@ -26,7 +26,7 @@ def _telemetry_path(home_dir: Path | None = None) -> Path:
def _env_disables(env: Mapping[str, str] | None = None) -> bool:
source = env or os.environ
source = os.environ if env is None else env
return bool(
source.get("KTX_TELEMETRY_DISABLED")
or source.get("DO_NOT_TRACK")