Skip to content

Commit fa3d956

Browse files
committed
docs(types): Note where StrPath comes from
1 parent 996582a commit fa3d956

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

libvcs/types.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
from os import PathLike
22
from typing import Union
33

4-
# See also, if this type is baked in in typing in the future
5-
# - https://stackoverflow.com/q/53418046/1396928
6-
# - https://github.com/python/typeshed/issues/5912
7-
# PathLike = TypeVar("PathLike", str, pathlib.Path)
8-
# OptionalPathLike = TypeVar("OptionalPathLike", str, pathlib.Path, None)
4+
# via github.com/python/typeshed/blob/5df8de7/stdlib/_typeshed/__init__.pyi#L115-L118
95

10-
11-
StrOrBytesPath = Union[str, bytes, PathLike[str], PathLike[bytes]] # stable
6+
#: :class:`os.PathLike` or :func:`str`
127
StrPath = Union[str, PathLike[str]] # stable
8+
#: :class:`os.PathLike`, :func:`str` or :term:`bytes-like object`
9+
StrOrBytesPath = Union[str, bytes, PathLike[str], PathLike[bytes]] # stable

0 commit comments

Comments
 (0)