From 4be9a953066a4c3ef8893d650c49f4edc170f5a7 Mon Sep 17 00:00:00 2001 From: Daniele Palaia Date: Thu, 23 May 2024 09:27:27 +0200 Subject: [PATCH] reverting utils.py --- rstream/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rstream/utils.py b/rstream/utils.py index 986e515..baca092 100644 --- a/rstream/utils.py +++ b/rstream/utils.py @@ -6,7 +6,7 @@ from dataclasses import dataclass from typing import Any, Callable, Generator, Optional -from .amqp import Message, _MessageProtocol +from .amqp import AMQPMessage, _MessageProtocol @dataclass @@ -54,7 +54,7 @@ class FilterConfiguration: def __init__( self, values_to_filter: list[str], - predicate: Optional[Callable[[Message], bool]] = None, + predicate: Optional[Callable[[AMQPMessage], bool]] = None, match_unfiltered: bool = False, ): self._values_to_filter = values_to_filter @@ -64,7 +64,7 @@ def __init__( def values(self) -> list[str]: return self._values_to_filter - def post_filler(self) -> Optional[Callable[[Message], bool]]: + def post_filler(self) -> Optional[Callable[[AMQPMessage], bool]]: return self._predicate def match_unfiltered(self) -> bool: