@@ -246,7 +246,7 @@ def set_filename(self, filename):
246246
247247 Parameters
248248 ----------
249- filename : str
249+ filename : str or os.PathLike
250250 If the image format only has one file associated with it,
251251 this will be the only filename set into the image
252252 ``.file_map`` attribute. Otherwise, the image instance will
@@ -279,7 +279,7 @@ def filespec_to_file_map(klass, filespec):
279279
280280 Parameters
281281 ----------
282- filespec : str
282+ filespec : str or os.PathLike
283283 Filename that might be for this image file type.
284284
285285 Returns
@@ -321,7 +321,7 @@ def to_filename(self, filename):
321321
322322 Parameters
323323 ----------
324- filename : str
324+ filename : str or os.PathLike
325325 filename to which to save image. We will parse `filename`
326326 with ``filespec_to_file_map`` to work out names for image,
327327 header etc.
@@ -419,7 +419,7 @@ def _sniff_meta_for(klass, filename, sniff_nbytes, sniff=None):
419419
420420 Parameters
421421 ----------
422- filename : str
422+ filename : str or os.PathLike
423423 Filename for an image, or an image header (metadata) file.
424424 If `filename` points to an image data file, and the image type has
425425 a separate "header" file, we work out the name of the header file,
@@ -466,7 +466,7 @@ def path_maybe_image(klass, filename, sniff=None, sniff_max=1024):
466466
467467 Parameters
468468 ----------
469- filename : str
469+ filename : str or os.PathLike
470470 Filename for an image, or an image header (metadata) file.
471471 If `filename` points to an image data file, and the image type has
472472 a separate "header" file, we work out the name of the header file,
0 commit comments