Skip to content

Commit e86a56e

Browse files
committed
Restore Python 3.8 compatibility (where builtins.type does not support subscripting).
1 parent 17e388b commit e86a56e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_files.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from dataclasses import dataclass
1111
from datetime import datetime, timedelta, timezone
1212
from tempfile import mkstemp
13-
from typing import Callable, List, Optional, Union
13+
from typing import Callable, List, Optional, Union, Type
1414
from urllib.parse import parse_qs, urlparse
1515

1616
import pytest
@@ -475,7 +475,7 @@ def __init__(
475475
body: Optional[str] = None,
476476

477477
# Custom exception to raise
478-
exception: Optional[type[BaseException]] = None,
478+
exception: Optional[Type[BaseException]] = None,
479479

480480
# Whether exception should be raised before calling processor()
481481
# (so changing server state)
@@ -610,7 +610,7 @@ def __init__(
610610
custom_response_on_create_abort_url=CustomResponse(enabled=False),
611611
custom_response_on_abort=CustomResponse(enabled=False),
612612
# exception which is expected to be thrown (so upload is expected to have failed)
613-
expected_exception_type: Optional[type[BaseException]] = None,
613+
expected_exception_type: Optional[Type[BaseException]] = None,
614614
# if abort is expected to be called
615615
expected_aborted: bool = False):
616616
self.name = name
@@ -1341,7 +1341,7 @@ def __init__(
13411341
custom_response_on_abort=CustomResponse(enabled=False),
13421342

13431343
# exception which is expected to be thrown (so upload is expected to have failed)
1344-
expected_exception_type: Optional[type[BaseException]] = None,
1344+
expected_exception_type: Optional[Type[BaseException]] = None,
13451345

13461346
# if abort is expected to be called
13471347
expected_aborted: bool = False):

0 commit comments

Comments
 (0)