From c1e2d37f3d832daf82dea1c60c38b9e27d4f2412 Mon Sep 17 00:00:00 2001 From: Matthew Murray Date: Wed, 2 Oct 2024 09:35:01 -0700 Subject: [PATCH] remove other utils --- python/cudf_polars/cudf_polars/utils/other.py | 30 ------------------- 1 file changed, 30 deletions(-) delete mode 100644 python/cudf_polars/cudf_polars/utils/other.py diff --git a/python/cudf_polars/cudf_polars/utils/other.py b/python/cudf_polars/cudf_polars/utils/other.py deleted file mode 100644 index 7d70375763c..00000000000 --- a/python/cudf_polars/cudf_polars/utils/other.py +++ /dev/null @@ -1,30 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. -# SPDX-License-Identifier: Apache-2.0 - -"""Other utilities.""" - -from __future__ import annotations - -import os - - -def _env_get_int(name, default): - """Get the integer value of the environment variable.""" - try: - return int(os.getenv(name, default)) - except (ValueError, TypeError): - return default - - -def _env_get_bool(name, default): - """Get the the boolean value of the environment variable.""" - env = os.getenv(name) - if env is None: - return default - as_a_int = _env_get_int(name, None) - env = env.lower().strip() - if env == "true" or env == "on" or as_a_int: - return True - if env == "false" or env == "off" or as_a_int == 0: - return False - return default