Skip to content

Commit

Permalink
fix: typing bugs, not using Union for 3.8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
fubuloubu committed Apr 8, 2024
1 parent 8ddb0d3 commit 64c281e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions silverback/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from ape.contracts import ContractEvent, ContractInstance
from ape.logging import logger
from ape.managers.chain import BlockContainer
from ape.types import AddressType
from ape.utils import ManagerAccessMixin
from taskiq import AsyncTaskiqDecoratedTask, TaskiqEvents

Expand All @@ -18,7 +17,7 @@

@dataclass
class Task:
container: BlockContainer | ContractEvent | None
container: Union[BlockContainer, ContractEvent, None]
handler: AsyncTaskiqDecoratedTask


Expand Down Expand Up @@ -101,7 +100,7 @@ def __init__(self, settings: Optional[Settings] = None):
def broker_task_decorator(
self,
task_type: TaskType,
container: BlockContainer | ContractEvent | None = None,
container: Union[BlockContainer, ContractEvent, None] = None,
):
def add_taskiq_task(handler: Callable):
# TODO: Support generic registration
Expand Down

0 comments on commit 64c281e

Please sign in to comment.