mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-26 19:40:51 +08:00
ci: fix lint error
This commit is contained in:
@@ -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="魔法纪录 魔法少女小圆外传",
|
||||
|
||||
Reference in New Issue
Block a user