Skip to content

Commit 64da11b

Browse files
committed
Fixing mypy issues
1 parent c934366 commit 64da11b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/io/common.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from io import BufferedIOBase, BytesIO, RawIOBase, TextIOWrapper
88
import mmap
99
import os
10-
import pathlib
10+
from os import PathLike
1111
from typing import IO, Any, AnyStr, Dict, List, Mapping, Optional, Tuple, cast
1212
from urllib.parse import (
1313
urljoin,
@@ -187,7 +187,7 @@ def stringify_path(
187187
# error: Item "IO[bytes]" of "Union[str, Path, IO[bytes]]" has no
188188
# attribute "__fspath__" [union-attr]
189189
filepath_or_buffer = filepath_or_buffer.__fspath__() # type: ignore[union-attr]
190-
elif isinstance(filepath_or_buffer, pathlib.Path):
190+
elif isinstance(filepath_or_buffer, PathLike):
191191
filepath_or_buffer = str(filepath_or_buffer)
192192
return _expand_user(filepath_or_buffer)
193193

0 commit comments

Comments
 (0)