aboutsummaryrefslogtreecommitdiffstats
path: root/cogs/utils/temp.py
diff options
context:
space:
mode:
authorsalmonik <raisersoft@proton.me>2026-04-19 15:43:32 +0200
committersalmonik <raisersoft@proton.me>2026-04-19 15:43:32 +0200
commit1dcdbe3cf03ff16b3ff2e2e6d572e0b3c72c18c0 (patch)
treef11dc45777d8b3c8ff0e2ca16be83f85b272bd48 /cogs/utils/temp.py
parenttest: add cron tests + improve existing tests (diff)
downloadsenator-sperma-1dcdbe3cf03ff16b3ff2e2e6d572e0b3c72c18c0.tar.gz
senator-sperma-1dcdbe3cf03ff16b3ff2e2e6d572e0b3c72c18c0.zip
refactor: simplify cogs, reduce complexity
- Remove unused imports and dead code - Cleaner error handling - Reduce cognitive complexity
Diffstat (limited to 'cogs/utils/temp.py')
-rw-r--r--cogs/utils/temp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cogs/utils/temp.py b/cogs/utils/temp.py
index 528d6a3..0b2c8d7 100644
--- a/cogs/utils/temp.py
+++ b/cogs/utils/temp.py
@@ -8,11 +8,11 @@ import tempfile
8 8
9def get_temp_dir(subdir: str = "senator_sperma") -> str: 9def get_temp_dir(subdir: str = "senator_sperma") -> str:
10 """Get or create a temp subdirectory. 10 """Get or create a temp subdirectory.
11 11
12 Uses system temp directory (/tmp on Linux, %TEMP% on Windows). 12 Uses system temp directory (/tmp on Linux, %TEMP% on Windows).
13 OS handles cleanup automatically. 13 OS handles cleanup automatically.
14 """ 14 """
15 base_temp = tempfile.gettempdir() 15 base_temp = tempfile.gettempdir()
16 temp_path = os.path.join(base_temp, subdir) 16 temp_path = os.path.join(base_temp, subdir)
17 os.makedirs(temp_path, exist_ok=True) 17 os.makedirs(temp_path, exist_ok=True)
18 return temp_path \ No newline at end of file 18 return temp_path