S108: ignore our uses

This commit is contained in:
Jörg Thalheim
2025-08-20 16:06:56 +02:00
parent 136acc7901
commit 0a70ed6268
5 changed files with 6 additions and 6 deletions

View File

@@ -176,7 +176,7 @@ class ClanFlake:
self.temporary_home = temporary_home
self.path = temporary_home / "flake"
if not suppress_tmp_home_warning:
if "/tmp" not in str(os.environ.get("HOME")):
if "/tmp" not in str(os.environ.get("HOME")): # noqa: S108 - Checking if HOME is in temp directory
log.warning(
f"!! $HOME does not point to a temp directory!! HOME={os.environ['HOME']}",
)
@@ -368,7 +368,7 @@ def create_flake(
check=True,
)
if "/tmp" not in str(os.environ.get("HOME")):
if "/tmp" not in str(os.environ.get("HOME")): # noqa: S108 - Checking if HOME is in temp directory
log.warning(
f"!! $HOME does not point to a temp directory!! HOME={os.environ['HOME']}",
)

View File

@@ -14,7 +14,7 @@ TEMPDIR = None
# macOS' default temporary directory is too long for unix sockets
# This can break applications such as gpg-agent
if platform == "darwin":
TEMPDIR = Path("/tmp")
TEMPDIR = Path("/tmp") # noqa: S108 - Required on macOS due to socket path length limits
@pytest.fixture