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 %}> - + - +
{{ gallery.category.label }}
@@ -71,14 +67,10 @@
{{ gallery.category.label }}
{% if not featured_collections %}style="display:none;"{% endif %}> - + - +
{% trans "Collections" %}
diff --git a/catalog/templates/edition.html b/catalog/templates/edition.html index 73f020a7..32d41358 100644 --- a/catalog/templates/edition.html +++ b/catalog/templates/edition.html @@ -79,14 +79,10 @@
contents
- + - +
{% trans 'other editions' %}
diff --git a/common/templates/_header.html b/common/templates/_header.html index 304a6a3f..2421ebad 100644 --- a/common/templates/_header.html +++ b/common/templates/_header.html @@ -80,6 +80,7 @@ diff --git a/journal/templates/mark.html b/journal/templates/mark.html index 032775fd..659ffd00 100644 --- a/journal/templates/mark.html +++ b/journal/templates/mark.html @@ -46,17 +46,11 @@
- - in me set star_input to the - - in me set star_div.style.width to (current_value * 10) + '%' set @data-tooltip to current_value or '{% trans "not rated" %}' set star_input.value to current_value end on mouseleave(currentTarget) set star_div to the -
- in me set star_input to the - - in me set current_value to star_input.value set star_div.style.width to (current_value * 10) + '%' set @data-tooltip to current_value or '{% trans "not rated" %}' end"> + in me set star_input to the in me set star_div.style.width to (current_value * 10) + '%' set @data-tooltip to current_value or '{% trans "not rated" %}' set star_input.value to current_value end on mouseleave(currentTarget) set star_div to the
in me set star_input to the in me set current_value to star_input.value set star_div.style.width to (current_value * 10) + '%' set @data-tooltip to current_value or '{% trans "not rated" %}' end" + {# djlint:on #} + id="rating_editor"> {{ mark.rating_grade|rating_star }} - + - +
@@ -78,14 +74,10 @@
{% if not shelf.count %}style="display:none;"{% endif %}> - + - +
@@ -117,14 +109,10 @@
{% if not collections_count %}style="display:none;"{% endif %}> - + - +
@@ -157,14 +145,10 @@
{% if not liked_collections_count %}style="display:none;"{% endif %}> - + - +
diff --git a/users/templates/users/account.html b/users/templates/users/account.html index e747de6f..b28468a6 100644 --- a/users/templates/users/account.html +++ b/users/templates/users/account.html @@ -318,7 +318,9 @@ placeholder="Gargron@mastodon.social"> {% trans "Once deleted, account data cannot be recovered." %} {% if import_status.douban_pending %} - + {% else %} {% if enable_email %} - {% endif %} - {% if enable_threads %} - {% endif %} {% if enable_bluesky %} - {% endif %} diff --git a/users/templates/users/register.html b/users/templates/users/register.html index 6335f91a..960326c7 100644 --- a/users/templates/users/register.html +++ b/users/templates/users/register.html @@ -23,7 +23,14 @@