Skip to content

Commit 061ed4b

Browse files
committed
fix type hint
1 parent 5391e67 commit 061ed4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

license_tools/utils/archive_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import shutil
1212
import zipfile
1313
from pathlib import Path
14-
from typing import Protocol
14+
from typing import Literal, Protocol
1515

1616
from license_tools.tools import rpm_tools
1717

@@ -53,7 +53,7 @@ def _unpack_with_shutil(archive_path: Path, target_directory: Path | str) -> Non
5353
:param archive_path: The archive file to unpack.
5454
:param target_directory: The directory to unpack to.
5555
"""
56-
filter_arg = None
56+
filter_arg: Literal["fully_trusted", "tar", "data"] | None = None
5757
if ".tar" in archive_path.suffixes:
5858
filter_arg = "data"
5959
shutil.unpack_archive(filename=archive_path, extract_dir=target_directory, filter=filter_arg)

0 commit comments

Comments
 (0)