From 1f9d4b362700536759d7c766b9ad36c9e0fd510b Mon Sep 17 00:00:00 2001 From: djperrefort Date: Mon, 19 Aug 2024 11:17:24 -0400 Subject: [PATCH] Make some methods private --- apps/crc_idle.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/crc_idle.py b/apps/crc_idle.py index 1e61398..20fb413 100755 --- a/apps/crc_idle.py +++ b/apps/crc_idle.py @@ -58,7 +58,7 @@ def get_cluster_list(self, args: Namespace) -> tuple[str]: return specified_clusters or argument_clusters @staticmethod - def count_idle_cpu_resources(cluster: str, partition: str) -> dict[int, int]: + def _count_idle_cpu_resources(cluster: str, partition: str) -> dict[int, int]: """Return the idle CPU resources on a given cluster partition. Args: @@ -83,7 +83,7 @@ def count_idle_cpu_resources(cluster: str, partition: str) -> dict[int, int]: return return_dict @staticmethod - def count_idle_gpu_resources(cluster: str, partition: str) -> dict[int, int]: + def _count_idle_gpu_resources(cluster: str, partition: str) -> dict[int, int]: """Return idle GPU resources on a given cluster partition. If the host node is in a `drain` state, the GPUs are reported as unavailable. @@ -135,10 +135,10 @@ def count_idle_resources(self, cluster: str, partition: str) -> dict[int, int]: cluster_type = self.cluster_types[cluster] if cluster_type == 'GPUs': - return self.count_idle_gpu_resources(cluster, partition) + return self._count_idle_gpu_resources(cluster, partition) elif cluster_type == 'cores': - return self.count_idle_cpu_resources(cluster, partition) + return self._count_idle_cpu_resources(cluster, partition) raise ValueError(f'Unknown cluster type: {cluster}')