Browse Source

fix VolumeFile.find() return type hint

Fabian Peter Hammerle 5 năm trước cách đây
mục cha
commit
3915914774
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      freesurfer_volume_reader/__init__.py

+ 2 - 1
freesurfer_volume_reader/__init__.py

@@ -36,7 +36,8 @@ class VolumeFile(metaclass=abc.ABCMeta):
 
     @classmethod
     def find(cls, root_dir_path: str,
-             filename_regex: typing.Optional[typing.Pattern] = None) -> typing.Iterator[str]:
+             filename_regex: typing.Optional[typing.Pattern] = None,
+             ) -> typing.Iterator[VolumeFile]:
         if not filename_regex:
             filename_regex = cls.FILENAME_REGEX
         for dirpath, _, filenames in os.walk(root_dir_path):