2929from wtforms .validators import Optional , DataRequired
3030from wtforms .validators import URL
3131
32- from typing import Any , TYPE_CHECKING , Self , Sequence , Collection
32+ from typing import Any , TYPE_CHECKING , Sequence , Collection
3333
3434if TYPE_CHECKING :
3535 from webob .request import _FieldStorageWithFile
36- from onegov .form .types import (
37- FormT , Validators )
3836
3937
4038class DummyPostData (dict [str , Any ]):
@@ -61,12 +59,10 @@ def create_file(
6159
6260def test_upload_field () -> None :
6361 def create_field (
64- validators : Validators [FormT , Self ] | None = None , # type:ignore[misc]
6562 allowed_mimetypes : Collection [str ] | None = None ,
6663 ) -> tuple [Form , UploadField ]:
6764 form = Form ()
6865 field = UploadField (
69- validators = validators ,
7066 allowed_mimetypes = allowed_mimetypes ,
7167 )
7268 field = field .bind (form , 'upload' ) # type: ignore[attr-defined]
@@ -267,12 +263,10 @@ def create_field(
267263
268264def test_upload_multiple_field () -> None :
269265 def create_field (
270- validators : Validators [FormT , Self ] | None = None , # type:ignore[misc]
271266 allowed_mimetypes : Sequence [str ] | None = None ,
272267 ) -> tuple [Form , UploadMultipleField ]:
273268 form = Form ()
274269 field = UploadMultipleField (
275- validators = validators ,
276270 allowed_mimetypes = allowed_mimetypes ,
277271 )
278272 field = field .bind (form , 'uploads' ) # type: ignore[attr-defined]
0 commit comments