use pathlib everywhere

This commit is contained in:
Jörg Thalheim
2024-09-02 18:25:17 +02:00
parent 9de48de991
commit 1fa0e72bea
28 changed files with 88 additions and 113 deletions

View File

@@ -122,7 +122,7 @@ class Programs:
@classmethod
def is_allowed(cls: type["Programs"], program: str) -> bool:
if cls.allowed_programs is None:
with open(Path(__file__).parent / "allowed-programs.json") as f:
with (Path(__file__).parent / "allowed-programs.json").open() as f:
cls.allowed_programs = json.load(f)
return program in cls.allowed_programs