Skip to content

Commit 3d3c47b

Browse files
committed
chore: fix code according to ruff 0.8.0
1 parent 645dbfb commit 3d3c47b

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

unblob/handlers/__init__.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
from ..models import DirectoryHandlers, Handlers
2-
from .archive import ar, arc, arj, cab, cpio, dmg, rar, sevenzip, stuffit, tar, zip
2+
from .archive import (
3+
ar,
4+
arc,
5+
arj,
6+
cab,
7+
cpio,
8+
dmg,
9+
rar,
10+
sevenzip,
11+
stuffit,
12+
tar,
13+
)
14+
from .archive import (
15+
zip as ziparchive,
16+
)
317
from .archive.autel import ecc
418
from .archive.dlink import encrpted_img, shrs
519
from .archive.engeniustech import engenius
@@ -80,7 +94,7 @@
8094
cpio.BinaryHandler,
8195
sevenzip.SevenZipHandler,
8296
rar.RarHandler,
83-
zip.ZIPHandler,
97+
ziparchive.ZIPHandler,
8498
dmg.DMGHandler,
8599
iso9660.ISO9660FSHandler,
86100
stuffit.StuffItSITHandler,

unblob/handlers/filesystem/yaffs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,7 @@ def auto_detect(self) -> YAFFSConfig:
408408
# Sanity check the spare size, make sure it looks legit
409409
if config.spare_size not in VALID_SPARE_SIZES:
410410
raise InvalidInputFormat(
411-
"Auto-detection failed: Detected an unlikely spare size: %d"
412-
% config.spare_size
411+
f"Auto-detection failed: Detected an unlikely spare size: {config.spare_size}"
413412
)
414413

415414
return config

unblob/testing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020

2121
@pytest.fixture(scope="session", autouse=True)
22-
def configure_logging(tmp_path_factory): # noqa: PT004
22+
def configure_logging(tmp_path_factory):
2323
extract_root = tmp_path_factory.mktemp("extract")
2424
log_path = tmp_path_factory.mktemp("logs") / "unblob.log"
2525
configure_logger(verbosity_level=3, extract_root=extract_root, log_path=log_path)

0 commit comments

Comments
 (0)