Skip to content

Commit

Permalink
Use Union for Python 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Nov 23, 2023
1 parent 7efc79f commit b6a869f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lvmnps/nps/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import abc
import asyncio

from typing import Any, Sequence, TypedDict
from typing import Any, Sequence, TypedDict, Union

from pydantic import BaseModel, ConfigDict

Expand Down Expand Up @@ -61,7 +61,8 @@ async def off(self):
await self._client.set_state(self, on=False)


OutletArgType = OutletModel | int | str | Sequence[str | int | OutletModel]
# Unions needed for Python 3.9
OutletArgType = Union[OutletModel, int, str, Sequence[Union[str, int, OutletModel]]]


class ImplementationsDict(TypedDict):
Expand Down

0 comments on commit b6a869f

Please sign in to comment.