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]:
408
408
return [path ] if path .exists () else []
409
409
410
410
411
- class DirectoryHandler (abc .ABC ):
411
+ DExtractor = TypeVar ("DExtractor" , bound = Union [None , DirectoryExtractor ])
412
+
413
+
414
+ class DirectoryHandler (abc .ABC , Generic [DExtractor ]):
412
415
"""A directory type handler is responsible for searching, validating and "unblobbing" files from multiple files in a directory."""
413
416
414
417
NAME : str
415
418
416
- EXTRACTOR : DirectoryExtractor
419
+ EXTRACTOR : DExtractor
417
420
418
421
PATTERN : DirectoryPattern
419
422
420
423
@classmethod
421
424
def get_dependencies (cls ):
422
425
"""Return external command dependencies needed for this handler to work."""
423
- if cls .EXTRACTOR :
426
+ if cls .EXTRACTOR is not None :
424
427
return cls .EXTRACTOR .get_dependencies ()
425
428
return []
426
429
You can’t perform that action at this time.
0 commit comments