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 @@ -408,19 +408,22 @@ def get_files(self, directory: Path) -> Iterable[Path]:
408408 return [path ] if path .exists () else []
409409
410410
411- class DirectoryHandler (abc .ABC ):
411+ DExtractor = TypeVar ("DExtractor" , bound = Union [None , DirectoryExtractor ])
412+
413+
414+ class DirectoryHandler (abc .ABC , Generic [DExtractor ]):
412415 """A directory type handler is responsible for searching, validating and "unblobbing" files from multiple files in a directory."""
413416
414417 NAME : str
415418
416- EXTRACTOR : DirectoryExtractor
419+ EXTRACTOR : DExtractor
417420
418421 PATTERN : DirectoryPattern
419422
420423 @classmethod
421424 def get_dependencies (cls ):
422425 """Return external command dependencies needed for this handler to work."""
423- if cls .EXTRACTOR :
426+ if cls .EXTRACTOR is not None :
424427 return cls .EXTRACTOR .get_dependencies ()
425428 return []
426429
You can’t perform that action at this time.
0 commit comments