Skip to content

Commit 0fa792f

Browse files
Place wheels into directories based on wheel title (#87)
1 parent 2e5954b commit 0fa792f

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

.pre-commit-config.yaml

+2-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ repos:
66
- id: end-of-file-fixer
77
- id: trailing-whitespace
88
- repo: https://github.com/astral-sh/ruff-pre-commit
9-
rev: v0.0.275
9+
rev: v0.3.5
1010
hooks:
1111
- id: ruff
1212
args: [ --fix, --exit-non-zero-on-fix ]
13-
- repo: https://github.com/psf/black
14-
rev: 22.10.0
15-
hooks:
16-
- id: black
13+
- id: ruff-format

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "safepull"
3-
version = "2.1.0"
3+
version = "2.1.1"
44
description = "A CLI tool for downloading and extracting packages from PyPI without interfacing with setup.py."
55
authors = ["Rem <[email protected]>"]
66
license = "MIT"
@@ -26,4 +26,4 @@ build-backend = "poetry.core.masonry.api"
2626
[tool.ruff]
2727
target-version = "py311"
2828
select = ["ALL"]
29-
ignore = ["ANN101", "ANN206", "ANN102"]
29+
ignore = ["ANN101", "ANN206", "ANN102", "S202"]

src/safepull/safepull.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
"""Safepull module for the safe handling of compressed Python scripts."""
2+
23
# ruff: noqa: T201
34

45
import argparse
56
import tarfile
67
from io import BytesIO
8+
from pathlib import Path
79
from zipfile import ZipFile
810

911
import requests
@@ -43,7 +45,7 @@ def unpack(byte_object: BytesIO, filename: str) -> None:
4345
sdist_tar.extractall()
4446
if filename.endswith((".whl", ".zip")):
4547
with ZipFile(byte_object) as whl_zip:
46-
whl_zip.extractall()
48+
whl_zip.extractall(path=Path.cwd().joinpath(f"{filename[:-4]}"))
4749

4850

4951
def run() -> None:

0 commit comments

Comments
 (0)