Skip to content

Commit e6c3d41

Browse files
committed
ci(mypy): Add types for StrPath
No TypeAlias available until 3.10, unless we want to including typing_extensions.
1 parent 14f04fe commit e6c3d41

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/tmuxp/types.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""Internal :term:`type annotations <annotation>`
2+
3+
Notes
4+
-----
5+
6+
:class:`StrPath` and :class:`StrOrBytesPath` is based on `typeshed's`_.
7+
8+
.. _typeshed's: https://github.com/python/typeshed/blob/9687d5/stdlib/_typeshed/__init__.pyi#L98
9+
""" # NOQA E501
10+
from os import PathLike
11+
from typing import Union
12+
13+
StrPath = Union[str, "PathLike[str]"]
14+
""":class:`os.PathLike` or :class:`str`"""

0 commit comments

Comments
 (0)