Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4f42777

Browse files
committed
consistently use path-like instead of PathLike in type descriptions
1 parent da6a11b commit 4f42777

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/matplotlib/backends/backend_agg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def print_png(self, filename_or_obj, *args,
439439
440440
Parameters
441441
----------
442-
filename_or_obj : str or PathLike or file-like object
442+
filename_or_obj : str or path-like or file-like
443443
The file to write to.
444444
445445
metadata : dict, optional
@@ -526,7 +526,7 @@ def print_jpg(self, filename_or_obj, *args, dryrun=False, pil_kwargs=None,
526526
527527
Parameters
528528
----------
529-
filename_or_obj : str or PathLike or file-like object
529+
filename_or_obj : str or path-like or file-like
530530
The file to write to.
531531
532532
Other Parameters

lib/matplotlib/cbook/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ def to_filehandle(fname, flag='r', return_opened=False, encoding=None):
378378
379379
Parameters
380380
----------
381-
fname : str or path-like or file-like object
381+
fname : str or path-like or file-like
382382
If `str` or `os.PathLike`, the file is opened using the flags specified
383383
by *flag* and *encoding*. If a file-like object, it is passed through.
384384
flag : str, default 'r'

lib/matplotlib/figure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2044,7 +2044,7 @@ def savefig(self, fname, *, transparent=None, **kwargs):
20442044
20452045
Parameters
20462046
----------
2047-
fname : str or PathLike or file-like object
2047+
fname : str or path-like or file-like
20482048
A path, or a Python file-like object, or
20492049
possibly some backend-dependent object such as
20502050
`matplotlib.backends.backend_pdf.PdfPages`.

lib/matplotlib/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1475,7 +1475,7 @@ def imsave(fname, arr, vmin=None, vmax=None, cmap=None, format=None,
14751475
14761476
Parameters
14771477
----------
1478-
fname : str or PathLike or file-like
1478+
fname : str or path-like or file-like
14791479
A path or a file-like object to store the image in.
14801480
If *format* is not set, then the output format is inferred from the
14811481
extension of *fname*, if any, and from :rc:`savefig.format` otherwise.

0 commit comments

Comments
 (0)