from typing import override from cross.post import Post from cross.service import OutputService from database.connection import DatabasePool class DummyOptions: @classmethod def from_dict(cls, obj) -> 'DummyOptions': return DummyOptions() class StderrOutputService(OutputService): def __init__(self, db: DatabasePool, options: DummyOptions) -> None: super().__init__("http://localhost", db) @override def accept_post(self, post: Post): self.log.info("%s", post) @override def accept_repost(self, repost_id: str, reposted_id: str): self.log.info("%s, %s", repost_id, reposted_id) @override def delete_post(self, post_id: str): self.log.info("%s", post_id) @override def delete_repost(self, repost_id: str): self.log.info("%s", repost_id)