From ad809c47edd6594ef79f8b722fbed2a814e880f9 Mon Sep 17 00:00:00 2001 From: Simon Kelly Date: Thu, 9 Nov 2023 13:34:19 +0200 Subject: [PATCH] update types for python 3.8 --- tests/test_form.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_form.py b/tests/test_form.py index 384be4f..9931be2 100644 --- a/tests/test_form.py +++ b/tests/test_form.py @@ -1,5 +1,6 @@ import dataclasses from datetime import date, datetime, time +from typing import List import pytest from django.forms import fields, modelform_factory @@ -27,7 +28,7 @@ def test_form_basics(dataclass_field, form_field): def test_form_field_classes(): - d_class = dataclasses.make_dataclass("DataclassFormTest", [("to", list[str])]) + d_class = dataclasses.make_dataclass("DataclassFormTest", [("to", List[str])]) form = modelform_factory(d_class, form=DataclassForm, fields="__all__", field_classes={"to": fields.EmailField}) assert list(form.base_fields) == ["to"] assert form.base_fields["to"].__class__ == fields.EmailField