Skip to content

Commit 9d5a0f1

Browse files
authored
Merge pull request #115 from ghazi-git/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents e8f82a4 + 344d570 commit 9d5a0f1

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repos:
1212
rev: 2025.6.1
1313
hooks:
1414
- id: shed
15-
additional_dependencies: [ 'black~=25.1' ]
15+
additional_dependencies: [ 'black~=26.3.1' ]
1616
types_or: [ python, pyi, markdown, rst ]
1717

1818
- repo: https://github.com/PyCQA/flake8
@@ -22,7 +22,7 @@ repos:
2222
args: [ --max-line-length, '120' , --ignore, 'E,W']
2323

2424
- repo: https://github.com/pre-commit/mirrors-mypy
25-
rev: v1.19.0
25+
rev: v1.20.2
2626
hooks:
2727
- id: mypy
2828
args: [ --ignore-missing-imports, --check-untyped-defs, --disallow-incomplete-defs ]

drf_standardized_errors/formatter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,6 @@ def flatten_errors(
140140
fifo.append((value, key, None))
141141

142142
else:
143-
errors.append(Error(detail.code, str(detail), attr))
143+
errors.append(Error(detail.code, str(detail), attr)) # type: ignore[union-attr]
144144

145145
return errors

tests/test_openapi_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ class CharForm(forms.Form):
505505

506506

507507
def test_char_fields_with_error_codes():
508-
(char, slug, regex, uuid, ip) = get_form_fields_with_error_codes(CharForm())
508+
char, slug, regex, uuid, ip = get_form_fields_with_error_codes(CharForm())
509509

510510
assert char.error_codes == {
511511
"required",
@@ -535,7 +535,7 @@ class NumberForm(forms.Form):
535535

536536

537537
def test_number_fields_with_error_codes():
538-
(integer, dec1, dec2, dec3, dec4) = get_form_fields_with_error_codes(NumberForm())
538+
integer, dec1, dec2, dec3, dec4 = get_form_fields_with_error_codes(NumberForm())
539539

540540
assert integer.error_codes == {"required", "max_value", "min_value", "invalid"}
541541
assert dec1.error_codes == {
@@ -556,7 +556,7 @@ class TemporalForm(forms.Form):
556556

557557

558558
def test_temporal_fields_with_error_codes():
559-
(date, datetime, duration) = get_form_fields_with_error_codes(TemporalForm())
559+
date, datetime, duration = get_form_fields_with_error_codes(TemporalForm())
560560

561561
assert date.error_codes == {"required", "invalid"}
562562
assert datetime.error_codes == {"invalid"}
@@ -587,7 +587,7 @@ class ChoiceForm(forms.Form):
587587

588588

589589
def test_choice_fields_with_error_codes():
590-
(choice, multiple_choice) = get_form_fields_with_error_codes(ChoiceForm())
590+
choice, multiple_choice = get_form_fields_with_error_codes(ChoiceForm())
591591

592592
assert choice.error_codes == {"required", "invalid_choice"}
593593
assert multiple_choice.error_codes == {"invalid_choice", "invalid_list"}

0 commit comments

Comments
 (0)