Skip to content

Commit f2228e0

Browse files
hugovknulano
andauthored
Replace bytes | str | Path with StrOrBytesPath
Co-authored-by: Ondrej Baranovič <nulano@nulano.eu>
1 parent 530512f commit f2228e0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/PIL/_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def is_path(f: Any) -> TypeGuard[StrOrBytesPath]:
1111
return isinstance(f, (bytes, str, os.PathLike))
1212

1313

14-
def is_directory(f: Any) -> TypeGuard[bytes | str | Path]:
14+
def is_directory(f: Any) -> TypeGuard[StrOrBytesPath]:
1515
"""Checks if an object is a string, and that it points to a directory."""
1616
return is_path(f) and os.path.isdir(f)
1717

0 commit comments

Comments
 (0)