wip/75442-upgrade-hooks #12

Merged
vdeniaud merged 3 commits from wip/75442-upgrade-hooks into main 2023-03-29 15:46:05 +02:00
3 changed files with 12 additions and 12 deletions

View File

@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks # See https://pre-commit.com/hooks.html for more hooks
repos: repos:
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 22.3.0 rev: 23.3.0
hooks: hooks:
- id: black - id: black
args: ['--target-version', 'py37', '--skip-string-normalization', '--line-length', '110'] args: ['--target-version', 'py37', '--skip-string-normalization', '--line-length', '110']
@ -12,12 +12,12 @@ repos:
- id: isort - id: isort
args: ['--profile', 'black', '--line-length', '110'] args: ['--profile', 'black', '--line-length', '110']
- repo: https://github.com/asottile/pyupgrade - repo: https://github.com/asottile/pyupgrade
rev: v3.1.0 rev: v3.3.1
hooks: hooks:
- id: pyupgrade - id: pyupgrade
args: ['--keep-percent-format', '--py37-plus'] args: ['--keep-percent-format', '--py39-plus']
- repo: https://github.com/rtts/djhtml - repo: https://github.com/rtts/djhtml
rev: 'v1.5.2' rev: '3.0.6'
hooks: hooks:
- id: djhtml - id: djhtml
args: ['--tabwidth', '2'] args: ['--tabwidth', '2']

View File

@ -36,7 +36,7 @@
<li class="ui-avatar">{{ user.get_full_name|slice:":1" }}</li> <li class="ui-avatar">{{ user.get_full_name|slice:":1" }}</li>
<li class="ui-name">{% block user-name %}{{ user.get_full_name }}{% endblock %}</li> <li class="ui-name">{% block user-name %}{{ user.get_full_name }}{% endblock %}</li>
<li class="ui-logout"><a href="{% block logout-url %}index.html{% endblock %}" <li class="ui-logout"><a href="{% block logout-url %}index.html{% endblock %}"
title="{% trans "Logout" %}"><span class="sr-only">{% trans "Logout" %}</span></a></li> title="{% trans "Logout" %}"><span class="sr-only">{% trans "Logout" %}</span></a></li>
{% endif %} {% endif %}
{% block help-link %} {% block help-link %}
{% endblock %} {% endblock %}

View File

@ -1,10 +1,10 @@
{% load gadjo i18n %} {% load gadjo i18n %}
<div class="widget <div class="widget
{{ field.css_classes }} {{ field.css_classes }}
django-{{ field|field_class_name }} django-{{ field|field_class_name }}
{% if field.errors %}widget-with-error{% endif %} {% if field.errors %}widget-with-error{% endif %}
{% if field.field.required %}widget-required{% else %}widget-optional{% endif %}" {% if field.field.required %}widget-required{% else %}widget-optional{% endif %}"
{% if field.id_for_label %}id="{{field.id_for_label}}_p"{% endif %}> {% if field.id_for_label %}id="{{field.id_for_label}}_p"{% endif %}>
{% block widget-title %} {% block widget-title %}
<div class="title" {% if field.id_for_label %}id="{{ field.id_for_label }}_title"{% endif %}> <div class="title" {% if field.id_for_label %}id="{{ field.id_for_label }}_title"{% endif %}>
{{ field.label_tag }} {{ field.label_tag }}
@ -17,8 +17,8 @@
{% endblock %} {% endblock %}
{% block widget-content %} {% block widget-content %}
<div class="content" <div class="content"
{% if field.id_for_label %}aria-labelledby="{{ field.id_for_label }}_title"{% endif %} {% if field.id_for_label %}aria-labelledby="{{ field.id_for_label }}_title"{% endif %}
{% block widget-attrs %}{% endblock %}> {% block widget-attrs %}{% endblock %}>
{% block widget-error %} {% block widget-error %}
{% if field.errors %} {% if field.errors %}
<div class="error"><p> <div class="error"><p>