Skip to content

Commit

Permalink
type lint
Browse files Browse the repository at this point in the history
  • Loading branch information
David Erb committed Jun 20, 2023
1 parent c2891a2 commit d4579d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/dls_utilpack/whatenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def compose_as_yaml(self) -> str:

self.__compose_scalar("VIRTUAL_ENV", output_dict)

sge_dict = {}
sge_dict: dict = {}
self.__compose_scalar("SGE_CELL", sge_dict)
self.__compose_scalar("SGE_EXECD_PORT", sge_dict)
self.__compose_scalar("SGE_QMASTER_PORT", sge_dict)
Expand All @@ -81,20 +81,20 @@ def compose_as_yaml(self) -> str:
self.__compose_scalar("JOB_NAME", sge_dict)
output_dict["sge"] = sge_dict

slurm_dict = {}
slurm_dict: dict = {}
for k in os.environ.keys():
if k.startswith("SLURM"):
self.__compose_scalar(k, slurm_dict)
output_dict["slurm"] = slurm_dict

conda_dict = {}
conda_dict: dict = {}
self.__compose_scalar("CONDA_PREFIX", conda_dict)
conda_shlvl = int(os.environ.get("CONDA_SHLVL", 0))
for i in range(conda_shlvl - 1, 0, -1):
self.__compose_scalar(f"CONDA_PREFIX_{i}", conda_dict)
output_dict["conda"] = conda_dict

modules_dict = {}
modules_dict: dict = {}
self.__compose_paths("MODULEPATH", modules_dict)
self.__compose_paths("MODULESHOME", modules_dict)
self.__compose_paths("LOADEDMODULES", modules_dict)
Expand Down

0 comments on commit d4579d3

Please sign in to comment.