Skip to content

Commit

Permalink
fix type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan6419846 committed Jan 12, 2024
1 parent 5391e67 commit 061ed4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions license_tools/utils/archive_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import shutil
import zipfile
from pathlib import Path
from typing import Protocol
from typing import Literal, Protocol

from license_tools.tools import rpm_tools

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

0 comments on commit 061ed4b

Please sign in to comment.