From 90b9d02561d1ce8439602f6caea0052370caa981 Mon Sep 17 00:00:00 2001 From: Kevin Montag Date: Mon, 22 Jul 2024 14:56:41 +0200 Subject: [PATCH] feat: accept PathLike argument for directory path output location --- src/alpax/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/alpax/__init__.py b/src/alpax/__init__.py index 491f030..aff0340 100644 --- a/src/alpax/__init__.py +++ b/src/alpax/__init__.py @@ -208,7 +208,7 @@ def __exit__( class DirectoryPackWriterAsync(PackWriterAsync[None]): - def __init__(self, output_dir: str, **k: Unpack[PackProperties]): + def __init__(self, output_dir: str | os.PathLike, **k: Unpack[PackProperties]): super().__init__(**k) self._output_dir = output_dir @@ -359,6 +359,6 @@ def do_write_file(absolute_path: str, content: bytes) -> None: class DirectoryPackWriter(PackWriter): - def __init__(self, output_dir: str, **k: Unpack[PackProperties]): + def __init__(self, output_dir: str | os.PathLike, **k: Unpack[PackProperties]): pack_writer_async = DirectoryPackWriterAsync(output_dir, **k) super().__init__(pack_writer_async)