Skip to content

Commit cb009cb

Browse files
committed
chore(extractors/command): fix reportIncompatibleMethodOverride lints
This check is currently turned off in our `basic` `typeCheckingMode` profile, but is enabled in the `standard` profile. Things done here: - removed the invalid cross inheritance, as the bases conflict on `extract` method Extractor -> Command ^ | x | v v DirectoryExtractor -> MultiFileCommand Error: unblob/extractors/command.py unblob/extractors/command.py:106:9 - error: Method "extract" overrides class "Command" in an incompatible manner   Parameter 2 name mismatch: base parameter is named "inpath", override parameter is named "paths" (reportIncompatibleMethodOverride)
1 parent 848c6df commit cb009cb

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

unblob/extractors/command.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,15 @@ def get_dependencies(self) -> list[str]:
102102
return [self._executable]
103103

104104

105-
class MultiFileCommand(Command, DirectoryExtractor):
105+
class MultiFileCommand(DirectoryExtractor):
106+
def __init__(self, *args, **kwargs):
107+
self._command = Command(*args, **kwargs)
108+
106109
def extract(self, paths: list[Path], outdir: Path):
107-
return super().extract(paths[0], outdir)
110+
return self._command.extract(paths[0], outdir)
111+
112+
def get_dependencies(self) -> list[str]:
113+
return self._command.get_dependencies()
108114

109115

110116
class InvalidCommandTemplate(ValueError):

0 commit comments

Comments
 (0)