mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-12-11 21:14:53 +08:00
fix bug
This commit is contained in:
parent
ab48e9656c
commit
6947079dbf
@ -68,6 +68,7 @@ class PlatformProto(metaclass=RegistryMeta):
|
|||||||
@abstractmethod
|
@abstractmethod
|
||||||
def get_category(self, post: RawPost) -> Optional[Category]:
|
def get_category(self, post: RawPost) -> Optional[Category]:
|
||||||
"Return category of given Rawpost"
|
"Return category of given Rawpost"
|
||||||
|
raise NotImplementedError()
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def get_tags(self, raw_post: RawPost) -> Optional[Collection[Tag]]:
|
def get_tags(self, raw_post: RawPost) -> Optional[Collection[Tag]]:
|
||||||
@ -80,6 +81,7 @@ class PlatformProto(metaclass=RegistryMeta):
|
|||||||
@abstractmethod
|
@abstractmethod
|
||||||
def filter_platform_custom(self, post: RawPost) -> bool:
|
def filter_platform_custom(self, post: RawPost) -> bool:
|
||||||
"a customed filter"
|
"a customed filter"
|
||||||
|
raise NotImplementedError()
|
||||||
|
|
||||||
async def _parse_with_cache(self, post: RawPost) -> Post:
|
async def _parse_with_cache(self, post: RawPost) -> Post:
|
||||||
post_id = self.get_id(post)
|
post_id = self.get_id(post)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user