Skip to content

Commit e46a504

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent b918122 commit e46a504

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

contrib/django/forms/boundfields.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from contextlib import suppress
2+
23
from django.forms.boundfield import BoundField
34

45

djangoproject/static/js/mod/character-counter.js

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
let CHARACTER_COUNTER_INPUT_SELECTOR_ATTR = 'data-character-counter-input-selector';
1+
let CHARACTER_COUNTER_INPUT_SELECTOR_ATTR =
2+
'data-character-counter-input-selector';
23

3-
let CHARACTER_COUNTER_INDICATOR_SELECTOR_ATTR = 'data-character-counter-indicator-selector';
4+
let CHARACTER_COUNTER_INDICATOR_SELECTOR_ATTR =
5+
'data-character-counter-indicator-selector';
46

57
let CharacterCounter = function (inputElement, indicatorElement) {
68
this.inputElement = inputElement;
@@ -21,18 +23,23 @@ CharacterCounter.prototype = {
2123
return;
2224
}
2325

24-
const remaining = this.inputElement.maxLength - this.inputElement.value.length;
26+
const remaining =
27+
this.inputElement.maxLength - this.inputElement.value.length;
2528
this.indicatorElement.innerText = String(remaining);
2629
},
2730
};
2831

2932
function setupCharacterCounter(counterElement) {
30-
let inputSelector = counterElement.getAttribute(CHARACTER_COUNTER_INPUT_SELECTOR_ATTR);
33+
let inputSelector = counterElement.getAttribute(
34+
CHARACTER_COUNTER_INPUT_SELECTOR_ATTR,
35+
);
3136
if (typeof inputSelector !== 'string') {
3237
return;
3338
}
3439

35-
let indicatorSelector = counterElement.getAttribute(CHARACTER_COUNTER_INDICATOR_SELECTOR_ATTR);
40+
let indicatorSelector = counterElement.getAttribute(
41+
CHARACTER_COUNTER_INDICATOR_SELECTOR_ATTR,
42+
);
3643
if (typeof indicatorSelector !== 'string') {
3744
return;
3845
}
@@ -52,7 +59,7 @@ function setupCharacterCounter(counterElement) {
5259
inputElement.addEventListener(
5360
'input',
5461
characterCounter.handleInputEvent.bind(characterCounter),
55-
)
62+
);
5663
}
5764

5865
function setupCharacterCounters() {

djangoproject/templates/accounts/edit_profile.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{% block title %}{% translate "Edit your profile" %}{% endblock %}
55

66
{% block head_extra %}
7-
<script src="{% static "js/mod/character-counter.js" %}"></script>
7+
<script src="{% static "js/mod/character-counter.js" %}"></script>
88
{% endblock head_extra %}
99

1010
{% block content %}
@@ -34,7 +34,7 @@ <h1>{% translate "Edit your profile" %}</h1>
3434
<div>
3535
{% if form.bio.errors %}
3636
<p id="{{ form.bio.id_for_label }}_error" class="errors">
37-
{{ form.bio.errors.as_text }}
37+
{{ form.bio.errors.as_text }}
3838
</p>
3939
{% endif %}
4040
<p>{{ form.bio }}</p>

0 commit comments

Comments
 (0)