diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 280b6771..75f57e3b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: - id: mixed-line-ending - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.1 + rev: v0.8.4 hooks: - id: ruff # - id: ruff-format @@ -42,7 +42,7 @@ repos: - id: black - repo: https://github.com/Riverside-Healthcare/djLint - rev: v1.35.2 + rev: v1.36.4 hooks: - id: djlint-reformat-django - id: djlint-django diff --git a/catalog/sites/bangumi.py b/catalog/sites/bangumi.py index 603f64e5..99c3d58d 100644 --- a/catalog/sites/bangumi.py +++ b/catalog/sites/bangumi.py @@ -132,7 +132,8 @@ def scrape(self): if o.get("name_cn"): titles[o.get("name_cn")] = "zh-cn" localized_title = [ - {"lang": l or detect_language(t), "text": t} for t, l in titles.items() + {"lang": lang or detect_language(t), "text": t} + for t, lang in titles.items() ] localized_desc = ( [{"lang": detect_language(brief), "text": brief}] if brief else [] diff --git a/catalog/templates/discover.html b/catalog/templates/discover.html index ba52d67a..4528e7a3 100644 --- a/catalog/templates/discover.html +++ b/catalog/templates/discover.html @@ -41,14 +41,10 @@ {% if not gallery.items %}style="display:none;"{% endif %}> - + - +