Skip to content

Commit

Permalink
Put publisher typevar specification back in
Browse files Browse the repository at this point in the history
  • Loading branch information
fajpunk committed Dec 10, 2024
1 parent 44eae9a commit 9efbb16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions safir/src/safir/metrics/_event_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ async def build_publisher_for_model(
schema_info = await self._schema_manager.register_model(model)

# Return the corresponding event publisher.
return KafkaEventPublisher(
return KafkaEventPublisher[P](
application=self._application,
event_class=model,
publisher=async_publisher,
Expand Down Expand Up @@ -586,7 +586,7 @@ async def build_publisher_for_model(
EventPublisher
An appropriate event publisher implementation instance.
"""
return NoopEventPublisher(self._application, model, self.logger)
return NoopEventPublisher[P](self._application, model, self.logger)


class MockEventManager(EventManager):
Expand Down Expand Up @@ -636,4 +636,4 @@ async def build_publisher_for_model(
EventPublisher
An appropriate event publisher implementation instance.
"""
return MockEventPublisher(self._application, model, self.logger)
return MockEventPublisher[P](self._application, model, self.logger)

0 comments on commit 9efbb16

Please sign in to comment.