From 9b12f90b4e113275b5e8ea33a88674275bf3a1c8 Mon Sep 17 00:00:00 2001 From: R1kaB3rN <100738684+R1kaB3rN@users.noreply.github.com> Date: Mon, 22 Jul 2024 17:28:48 -0700 Subject: [PATCH] chore: remove unused functions --- umu/umu_test.py | 6 ------ umu/umu_util.py | 27 --------------------------- 2 files changed, 33 deletions(-) diff --git a/umu/umu_test.py b/umu/umu_test.py index e72f01d0..8e06adc3 100644 --- a/umu/umu_test.py +++ b/umu/umu_test.py @@ -264,12 +264,6 @@ def test_get_libc(self): umu_util.get_libc(), str, "Value is not a string" ) - def test_is_steamdeck(self): - """Test is_steamdeck.""" - self.assertIsInstance( - umu_util.is_steamdeck(), bool, "Expected a boolean" - ) - def test_is_installed_verb_noverb(self): """Test is_installed_verb when passed an empty verb.""" verb = [] diff --git a/umu/umu_util.py b/umu/umu_util.py index 3ca77a88..0e3f9dd4 100644 --- a/umu/umu_util.py +++ b/umu/umu_util.py @@ -124,30 +124,3 @@ def is_winetricks_verb( return False return True - - -@lru_cache -def is_steamdeck() -> bool: - """Determine if the host device is a Steam Deck by its CPU model.""" - cpu_info: Path = Path("/proc/cpuinfo") - is_sd: bool = False - sd_models: set[str] = {"AMD Custom APU 0405", "AMD Custom APU 0932"} - - if not cpu_info.is_file(): - return is_sd - - with cpu_info.open(mode="r", encoding="utf-8") as file: - for line in file: - if line.startswith("model name"): - _: str = line[line.find(":") + 1 :].strip() - if _ in sd_models: - is_sd = True - break - - return is_sd - - -@lru_cache -def whereis(bin: str) -> str: - """Return the absolute path of an executable.""" - return which(bin) or ""