Skip to content

Commit ee32e7e

Browse files
committed
types: Add StrPath
1 parent 09de00a commit ee32e7e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/libtmux/_internal/types.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""Internal type annotations.
2+
3+
Notes
4+
-----
5+
:class:`StrPath` and :class:`StrOrBytesPath` is based on `typeshed's`_.
6+
7+
.. _typeshed's: https://github.com/python/typeshed/blob/5ff32f3/stdlib/_typeshed/__init__.pyi#L176-L179
8+
""" # E501
9+
10+
from __future__ import annotations
11+
12+
import typing as t
13+
14+
if t.TYPE_CHECKING:
15+
from os import PathLike
16+
17+
from typing_extensions import TypeAlias
18+
19+
StrPath: TypeAlias = "str | PathLike[str]"

0 commit comments

Comments
 (0)