fix mypy Path
This commit is contained in:
@@ -15,7 +15,7 @@ from .base_analyzer import SubprocessAnalyzer
|
||||
class DecomposerAnalyzer(SubprocessAnalyzer):
|
||||
"""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)
|
||||
|
||||
def get_results(self, _: Optional[str] = None) -> dict[str, Any]:
|
||||
|
||||
@@ -12,7 +12,7 @@ from .base_analyzer import SubprocessAnalyzer
|
||||
class ExiftoolAnalyzer(SubprocessAnalyzer):
|
||||
"""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)
|
||||
self.cmd = ["exiftool", "-a", "-u", "-g1", self.img]
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ from .base_analyzer import SubprocessAnalyzer
|
||||
class ForemostAnalyzer(SubprocessAnalyzer):
|
||||
"""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)
|
||||
self.cmd = ["foremost", "-o", str(self.get_extracted_dir()), "-i", self.img]
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class ResizeAnalyzer(SubprocessAnalyzer):
|
||||
|
||||
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)
|
||||
|
||||
def _lookup_crc(self) -> List[PNG]:
|
||||
|
||||
@@ -12,7 +12,7 @@ from .base_analyzer import SubprocessAnalyzer
|
||||
class OpenStegoAnalyzer(SubprocessAnalyzer):
|
||||
"""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)
|
||||
self.algo = 0
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ from .base_analyzer import SubprocessAnalyzer
|
||||
class OutguessAnalyzer(SubprocessAnalyzer):
|
||||
"""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)
|
||||
|
||||
def build_cmd(self, password: Optional[str] = None) -> list[str]:
|
||||
|
||||
@@ -12,7 +12,7 @@ from .base_analyzer import SubprocessAnalyzer
|
||||
class PngcheckAnalyzer(SubprocessAnalyzer):
|
||||
"""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)
|
||||
self.cmd = ["pngcheck", "-v", self.img]
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ from .base_analyzer import SubprocessAnalyzer
|
||||
class SteghideAnalyzer(SubprocessAnalyzer):
|
||||
"""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)
|
||||
|
||||
def build_cmd(self, password: Optional[str] = None) -> list[str]:
|
||||
|
||||
@@ -12,7 +12,7 @@ from .base_analyzer import SubprocessAnalyzer
|
||||
class StringsAnalyzer(SubprocessAnalyzer):
|
||||
"""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)
|
||||
self.cmd = ["strings", self.img]
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ from .base_analyzer import SubprocessAnalyzer
|
||||
class TemplateAnalyze(SubprocessAnalyzer):
|
||||
"""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)
|
||||
|
||||
def build_cmd(self, password: Optional[str] = None) -> list[str]:
|
||||
|
||||
@@ -12,7 +12,7 @@ from .base_analyzer import SubprocessAnalyzer
|
||||
class ZstegAnalyzer(SubprocessAnalyzer):
|
||||
"""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)
|
||||
self.cmd = ["zsteg", self.img]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user