chore(format): fix the ruff checking issue

This commit is contained in:
100gle
2023-10-02 13:16:31 +08:00
parent c6aaddddbc
commit 3ead13f4b0
41 changed files with 316 additions and 186 deletions

View File

@@ -1,5 +1,5 @@
from .mikan_parser import mikan_parser
from .openai import OpenAIParser
from .raw_parser import raw_parser
from .tmdb_parser import tmdb_parser
from .torrent_parser import torrent_parser
from .mikan_parser import mikan_parser
from .openai import OpenAIParser

View File

@@ -5,7 +5,6 @@ from dataclasses import dataclass
from module.conf import TMDB_API
from module.network import RequestContent
TMDB_URL = "https://api.themoviedb.org"
@@ -50,7 +49,9 @@ def get_season(seasons: list) -> tuple[int, str]:
[year, _, _] = date
now_year = time.localtime().tm_year
if int(year) <= now_year:
return int(re.findall(r"\d", season.get("season"))[0]), season.get("poster_path")
return int(re.findall(r"\d", season.get("season"))[0]), season.get(
"poster_path"
)
return len(ss), ss[-1].get("poster_path")
@@ -100,5 +101,5 @@ def tmdb_parser(title, language) -> TMDBInfo | None:
return None
if __name__ == '__main__':
print(tmdb_parser("魔法禁书目录", "zh"))
if __name__ == "__main__":
print(tmdb_parser("魔法禁书目录", "zh"))

View File

@@ -1,6 +1,6 @@
import logging
from pathlib import Path
import re
from pathlib import Path
from module.models import EpisodeFile, SubtitleFile