ci: fix lint error

This commit is contained in:
100gle
2023-06-07 20:58:11 +08:00
parent f317da890e
commit 60a66fca69
15 changed files with 27 additions and 29 deletions

View File

@@ -4,7 +4,12 @@ from module.conf import settings
from module.database import BangumiDatabase
from module.models import Notification
from .plugin import *
from .plugin import (
BarkNotification,
ServerChanNotification,
TelegramNotification,
WecomNotification,
)
logger = logging.getLogger(__name__)
@@ -26,8 +31,7 @@ class PostNotification:
def __init__(self):
Notifier = getClient(settings.notification.type)
self.notifier = Notifier(
token=settings.notification.token,
chat_id=settings.notification.chat_id
token=settings.notification.token, chat_id=settings.notification.chat_id
)
@staticmethod
@@ -37,11 +41,11 @@ class PostNotification:
if poster_path:
poster_link = "https://mikanani.me" + poster_path
text = f"""
番剧名称:{notify.official_title}\n季度: {notify.season}\n更新集数: {notify.episode}\n{poster_link}\n
番剧名称:{notify.official_title}\n季度:第{notify.season}\n更新集数:第{notify.episode}\n{poster_link}\n
"""
else:
text = f"""
番剧名称:{notify.official_title}\n季度: {notify.season}\n更新集数: {notify.episode}\n
番剧名称:{notify.official_title}\n季度:第{notify.season}\n更新集数:第{notify.episode}\n
"""
return text
@@ -61,6 +65,7 @@ class PostNotification:
def __exit__(self, exc_type, exc_val, exc_tb):
self.notifier.__exit__(exc_type, exc_val, exc_tb)
if __name__ == "__main__":
info = Notification(
official_title="魔法纪录 魔法少女小圆外传",