fix mypy Path

This commit is contained in:
Zeecka
2026-01-02 21:04:03 +01:00
parent 456e041892
commit 2ea69e2e46
11 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ from .base_analyzer import SubprocessAnalyzer
class DecomposerAnalyzer(SubprocessAnalyzer): class DecomposerAnalyzer(SubprocessAnalyzer):
"""Analyzer for bits decomposer.""" """Analyzer for bits decomposer."""
def __init__(self, input_img, output_dir: Any) -> None: def __init__(self, input_img: Path, output_dir: Path) -> None:
super().__init__("decomposer", input_img, output_dir) super().__init__("decomposer", input_img, output_dir)
def get_results(self, _: Optional[str] = None) -> dict[str, Any]: def get_results(self, _: Optional[str] = None) -> dict[str, Any]:
+1 -1
View File
@@ -12,7 +12,7 @@ from .base_analyzer import SubprocessAnalyzer
class ExiftoolAnalyzer(SubprocessAnalyzer): class ExiftoolAnalyzer(SubprocessAnalyzer):
"""Analyzer for exiftool.""" """Analyzer for exiftool."""
def __init__(self, input_img, output_dir: Any) -> None: def __init__(self, input_img: Path, output_dir: Path) -> None:
super().__init__("exiftool", input_img, output_dir) super().__init__("exiftool", input_img, output_dir)
self.cmd = ["exiftool", "-a", "-u", "-g1", self.img] self.cmd = ["exiftool", "-a", "-u", "-g1", self.img]
+1 -1
View File
@@ -12,7 +12,7 @@ from .base_analyzer import SubprocessAnalyzer
class ForemostAnalyzer(SubprocessAnalyzer): class ForemostAnalyzer(SubprocessAnalyzer):
"""Analyzer for foremost.""" """Analyzer for foremost."""
def __init__(self, input_img, output_dir: Any) -> None: def __init__(self, input_img: Path, output_dir: Path) -> None:
super().__init__("foremost", input_img, output_dir, has_archive=True) super().__init__("foremost", input_img, output_dir, has_archive=True)
self.cmd = ["foremost", "-o", str(self.get_extracted_dir()), "-i", self.img] self.cmd = ["foremost", "-o", str(self.get_extracted_dir()), "-i", self.img]
+1 -1
View File
@@ -17,7 +17,7 @@ class ResizeAnalyzer(SubprocessAnalyzer):
png: PNG png: PNG
def __init__(self, input_img, output_dir: Any) -> None: def __init__(self, input_img: Path, output_dir: Path) -> None:
super().__init__("image_resize", input_img, output_dir, has_archive=True) super().__init__("image_resize", input_img, output_dir, has_archive=True)
def _lookup_crc(self) -> List[PNG]: def _lookup_crc(self) -> List[PNG]:
+1 -1
View File
@@ -12,7 +12,7 @@ from .base_analyzer import SubprocessAnalyzer
class OpenStegoAnalyzer(SubprocessAnalyzer): class OpenStegoAnalyzer(SubprocessAnalyzer):
"""Analyzer for openstego.""" """Analyzer for openstego."""
def __init__(self, input_img, output_dir: Any) -> None: def __init__(self, input_img: Path, output_dir: Path) -> None:
super().__init__("openstego", input_img, output_dir, has_archive=True) super().__init__("openstego", input_img, output_dir, has_archive=True)
self.algo = 0 self.algo = 0
+1 -1
View File
@@ -12,7 +12,7 @@ from .base_analyzer import SubprocessAnalyzer
class OutguessAnalyzer(SubprocessAnalyzer): class OutguessAnalyzer(SubprocessAnalyzer):
"""Analyzer for outguess.""" """Analyzer for outguess."""
def __init__(self, input_img, output_dir: Any) -> None: def __init__(self, input_img: Path, output_dir: Path) -> None:
super().__init__("outguess", input_img, output_dir, has_archive=True) super().__init__("outguess", input_img, output_dir, has_archive=True)
def build_cmd(self, password: Optional[str] = None) -> list[str]: def build_cmd(self, password: Optional[str] = None) -> list[str]:
+1 -1
View File
@@ -12,7 +12,7 @@ from .base_analyzer import SubprocessAnalyzer
class PngcheckAnalyzer(SubprocessAnalyzer): class PngcheckAnalyzer(SubprocessAnalyzer):
"""Analyzer for pngcheck.""" """Analyzer for pngcheck."""
def __init__(self, input_img, output_dir: Any) -> None: def __init__(self, input_img: Path, output_dir: Path) -> None:
super().__init__("pngcheck", input_img, output_dir) super().__init__("pngcheck", input_img, output_dir)
self.cmd = ["pngcheck", "-v", self.img] self.cmd = ["pngcheck", "-v", self.img]
+1 -1
View File
@@ -13,7 +13,7 @@ from .base_analyzer import SubprocessAnalyzer
class SteghideAnalyzer(SubprocessAnalyzer): class SteghideAnalyzer(SubprocessAnalyzer):
"""Analyzer for steghide.""" """Analyzer for steghide."""
def __init__(self, input_img, output_dir: Any) -> None: def __init__(self, input_img: Path, output_dir: Path) -> None:
super().__init__("steghide", input_img, output_dir, has_archive=True) super().__init__("steghide", input_img, output_dir, has_archive=True)
def build_cmd(self, password: Optional[str] = None) -> list[str]: def build_cmd(self, password: Optional[str] = None) -> list[str]:
+1 -1
View File
@@ -12,7 +12,7 @@ from .base_analyzer import SubprocessAnalyzer
class StringsAnalyzer(SubprocessAnalyzer): class StringsAnalyzer(SubprocessAnalyzer):
"""Analyzer for strings.""" """Analyzer for strings."""
def __init__(self, input_img, output_dir: Any) -> None: def __init__(self, input_img: Path, output_dir: Path) -> None:
super().__init__("strings", input_img, output_dir) super().__init__("strings", input_img, output_dir)
self.cmd = ["strings", self.img] self.cmd = ["strings", self.img]
+1 -1
View File
@@ -12,7 +12,7 @@ from .base_analyzer import SubprocessAnalyzer
class TemplateAnalyze(SubprocessAnalyzer): class TemplateAnalyze(SubprocessAnalyzer):
"""Analyzer for <toolname>.""" """Analyzer for <toolname>."""
def __init__(self, input_img, output_dir: Any) -> None: def __init__(self, input_img: Path, output_dir: Path) -> None:
super().__init__("<toolname>", input_img, output_dir, has_archive=True) super().__init__("<toolname>", input_img, output_dir, has_archive=True)
def build_cmd(self, password: Optional[str] = None) -> list[str]: def build_cmd(self, password: Optional[str] = None) -> list[str]:
+1 -1
View File
@@ -12,7 +12,7 @@ from .base_analyzer import SubprocessAnalyzer
class ZstegAnalyzer(SubprocessAnalyzer): class ZstegAnalyzer(SubprocessAnalyzer):
"""Analyzer for zsteg.""" """Analyzer for zsteg."""
def __init__(self, input_img, output_dir: Any) -> None: def __init__(self, input_img: Path, output_dir: Path) -> None:
super().__init__("zsteg", input_img, output_dir) super().__init__("zsteg", input_img, output_dir)
self.cmd = ["zsteg", self.img] self.cmd = ["zsteg", self.img]