Skip to content

Commit

Permalink
fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored Nov 6, 2023
1 parent 3815aad commit f21abfa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/orb/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ async def aclose(self) -> None:
# while adding support for `PathLike` instances
ProxiesDict = Dict["str | URL", Union[None, str, URL, Proxy]]
ProxiesTypes = Union[str, Proxy, ProxiesDict]
FileContent = Union[IO[bytes], bytes, PathLike[str]]
if TYPE_CHECKING:
FileContent = Union[IO[bytes], bytes, PathLike[str]]
else:
FileContent = Union[IO[bytes], bytes, PathLike] # PathLike is not subscriptable in Python 3.8.
FileTypes = Union[
# file (or bytes)
FileContent,
Expand Down

0 comments on commit f21abfa

Please sign in to comment.