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
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']
@ -12,12 +12,12 @@ 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'
rev: '3.0.6'
hooks:
- id: djhtml
args: ['--tabwidth', '2']

View File

@ -36,7 +36,7 @@
<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-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 %}
{% block help-link %}
{% endblock %}

View File

@ -1,10 +1,10 @@
{% load gadjo i18n %}
<div class="widget
{{ 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 %}>
{{ 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 %}
<div class="title" {% if field.id_for_label %}id="{{ field.id_for_label }}_title"{% endif %}>
{{ field.label_tag }}
@ -17,8 +17,8 @@
{% endblock %}
{% block widget-content %}
<div class="content"
{% if field.id_for_label %}aria-labelledby="{{ field.id_for_label }}_title"{% endif %}
{% block widget-attrs %}{% endblock %}>
{% if field.id_for_label %}aria-labelledby="{{ field.id_for_label }}_title"{% endif %}
{% block widget-attrs %}{% endblock %}>
{% block widget-error %}
{% if field.errors %}
<div class="error"><p>