File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -422,12 +422,15 @@ def get_files(self, directory: Path) -> Iterable[Path]:
422422 return [path ] if path .exists () else []
423423
424424
425- class DirectoryHandler (abc .ABC ):
425+ DExtractor = TypeVar ("DExtractor" , bound = Union [None , DirectoryExtractor ])
426+
427+
428+ class DirectoryHandler (abc .ABC , Generic [DExtractor ]):
426429 """A directory type handler is responsible for searching, validating and "unblobbing" files from multiple files in a directory."""
427430
428431 NAME : str
429432
430- EXTRACTOR : DirectoryExtractor
433+ EXTRACTOR : DExtractor
431434
432435 PATTERN : DirectoryPattern
433436
@@ -436,7 +439,7 @@ class DirectoryHandler(abc.ABC):
436439 @classmethod
437440 def get_dependencies (cls ):
438441 """Return external command dependencies needed for this handler to work."""
439- if cls .EXTRACTOR :
442+ if cls .EXTRACTOR is not None :
440443 return cls .EXTRACTOR .get_dependencies ()
441444 return []
442445
You can’t perform that action at this time.
0 commit comments