From 42c8c469810eef769852d688c27a179fc8971ac9 Mon Sep 17 00:00:00 2001 From: Valentin Deniaud Date: Wed, 29 Mar 2023 14:44:29 +0200 Subject: [PATCH 1/3] misc: change pyupgrade target version to 3.9 (#75442) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bda6033..7c90796 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,10 +12,10 @@ repos: - id: isort args: ['--profile', 'black', '--line-length', '110'] - repo: https://github.com/asottile/pyupgrade - rev: v3.1.0 + rev: v3.3.1 hooks: - id: pyupgrade - args: ['--keep-percent-format', '--py37-plus'] + args: ['--keep-percent-format', '--py39-plus'] - repo: https://github.com/rtts/djhtml rev: 'v1.5.2' hooks: -- 2.39.2 From a955c9702ae86982fb794debefe6815531127c5c Mon Sep 17 00:00:00 2001 From: Valentin Deniaud Date: Wed, 29 Mar 2023 14:44:33 +0200 Subject: [PATCH 2/3] misc: bump black version (#75442) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7c90796..7a1007f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 23.3.0 hooks: - id: black args: ['--target-version', 'py37', '--skip-string-normalization', '--line-length', '110'] -- 2.39.2 From 2b824e5b5a61e5c74af0e92b439a93c945bb20c1 Mon Sep 17 00:00:00 2001 From: Valentin Deniaud Date: Wed, 29 Mar 2023 14:44:34 +0200 Subject: [PATCH 3/3] misc: bump djhtml version (#75442) --- .pre-commit-config.yaml | 2 +- gadjo/templates/gadjo/root.html | 2 +- gadjo/templates/gadjo/widget.html | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7a1007f..2feb429 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,7 +17,7 @@ repos: - id: pyupgrade args: ['--keep-percent-format', '--py39-plus'] - repo: https://github.com/rtts/djhtml - rev: 'v1.5.2' + rev: '3.0.6' hooks: - id: djhtml args: ['--tabwidth', '2'] diff --git a/gadjo/templates/gadjo/root.html b/gadjo/templates/gadjo/root.html index 5c345b3..da08d9d 100644 --- a/gadjo/templates/gadjo/root.html +++ b/gadjo/templates/gadjo/root.html @@ -36,7 +36,7 @@
  • {{ user.get_full_name|slice:":1" }}
  • {% block user-name %}{{ user.get_full_name }}{% endblock %}
  • {% trans "Logout" %}
  • + title="{% trans "Logout" %}">{% trans "Logout" %} {% endif %} {% block help-link %} {% endblock %} diff --git a/gadjo/templates/gadjo/widget.html b/gadjo/templates/gadjo/widget.html index 7e913d4..741254a 100644 --- a/gadjo/templates/gadjo/widget.html +++ b/gadjo/templates/gadjo/widget.html @@ -1,10 +1,10 @@ {% load gadjo i18n %}
    + {{ field.css_classes }} + django-{{ field|field_class_name }} + {% if field.errors %}widget-with-error{% endif %} + {% if field.field.required %}widget-required{% else %}widget-optional{% endif %}" + {% if field.id_for_label %}id="{{field.id_for_label}}_p"{% endif %}> {% block widget-title %}
    {{ field.label_tag }} @@ -17,8 +17,8 @@ {% endblock %} {% block widget-content %}
    + {% if field.id_for_label %}aria-labelledby="{{ field.id_for_label }}_title"{% endif %} + {% block widget-attrs %}{% endblock %}> {% block widget-error %} {% if field.errors %}

    -- 2.39.2