Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
dholth committed Jul 27, 2024
1 parent 22f5910 commit 3606f08
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/conda_package_handling/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ def _stream_components(
filename: str,
components: list[str],
dest_dir: str = "",
) -> Generator[
Generator[tuple[tarfile.TarFile, tarfile.TarInfo], None, None], None, None
]:
) -> Generator[Generator[tuple[tarfile.TarFile, tarfile.TarInfo], None, None], None, None]:
if str(filename).endswith(".tar.bz2"):
assert components == ["pkg"]

Expand All @@ -37,9 +35,7 @@ def _stream_components(
except cps_exceptions.CaseInsensitiveFileSystemError as e:
raise exceptions.CaseInsensitiveFileSystemError(filename, dest_dir) from e
except (OSError, TarError, BadZipFile) as e:
raise exceptions.InvalidArchiveError(
filename, f"failed with error: {str(e)}"
) from e
raise exceptions.InvalidArchiveError(filename, f"failed with error: {str(e)}") from e


def _extract(filename: str, dest_dir: str, components: list[str]):
Expand All @@ -59,9 +55,7 @@ def _extract(filename: str, dest_dir: str, components: list[str]):
except cps_exceptions.CaseInsensitiveFileSystemError as e:
raise exceptions.CaseInsensitiveFileSystemError(filename, dest_dir) from e
except (OSError, TarError, BadZipFile) as e:
raise exceptions.InvalidArchiveError(
filename, f"failed with error: {str(e)}"
) from e
raise exceptions.InvalidArchiveError(filename, f"failed with error: {str(e)}") from e


def _list(filename: str, components: list[str], verbose=True):
Expand Down

0 comments on commit 3606f08

Please sign in to comment.