From 8659f0372e3160da7f48ab40daf7ccd99fc29b0a Mon Sep 17 00:00:00 2001 From: Nathan Baker Date: Sat, 30 Dec 2023 15:25:46 -0800 Subject: [PATCH] Clean up POSIX path conversion. Replace `str.join` with `Path.as_posix`. --- propka/input.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/propka/input.py b/propka/input.py index a9ebc18..6a67052 100644 --- a/propka/input.py +++ b/propka/input.py @@ -41,7 +41,7 @@ def open_file_for_reading(input_file: _TextIOSource) -> ContextManager[IO[str]]: print(f"Parent {p} is not ZIP file.") continue zf = zipfile.ZipFile(p) - path_string = "/".join(input_file.relative_to(p).parts) + path_string = Path.as_posix(input_file.relative_to(p)) stream = zf.open(path_string) return io.TextIOWrapper(stream)