From ddddaa447bb1e9e0d5b679939084384f14be2560 Mon Sep 17 00:00:00 2001
From: Jithu Murugan <j.murugan@fz-juelich.de>
Date: Fri, 21 Feb 2025 14:37:58 +0100
Subject: [PATCH] - Corrected the docstring for the setup_spack_env function
 along with the return type.

---
 dedal/spack_factory/SpackOperationUseCache.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/dedal/spack_factory/SpackOperationUseCache.py b/dedal/spack_factory/SpackOperationUseCache.py
index 1105a6e..6575ba9 100644
--- a/dedal/spack_factory/SpackOperationUseCache.py
+++ b/dedal/spack_factory/SpackOperationUseCache.py
@@ -26,11 +26,15 @@ class SpackOperationUseCache(SpackOperation):
                                              os.environ.get('BUILDCACHE_OCI_PASSWORD'),
                                              cache_version=cache_version_build)
 
-    def setup_spack_env(self):
-        """Sets up the Spack environment using cached data.
+    def setup_spack_env(self) -> None:
+        """Set up the spack environment for using the cache.
 
-        Downloads the build cache, trusts the cached public key (if available),
-        and adds the build cache as a local mirror.
+        Downloads the build cache, adds the public key to trusted keys,
+        and adds the build cache mirror.
+
+        Raises:
+            ValueError: If there is an issue with the build cache setup.
+            NoSpackEnvironmentException: If the spack environment is not set up.
         """
         super().setup_spack_env()
         try:
-- 
GitLab