Skip to content

Commit 22790f1

Browse files
committed
Fix errors on Python 3.8 due to types
1 parent 57f5def commit 22790f1

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

solc_select/infrastructure/http_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
retry logic and proper timeout handling.
66
"""
77

8-
from typing import Any, Mapping, Optional, Union
8+
from typing import Any, Mapping, Optional, Tuple, Union
99

1010
import requests
1111
from requests.adapters import HTTPAdapter
@@ -22,9 +22,9 @@ def send(
2222
self,
2323
request: PreparedRequest,
2424
stream: bool = False,
25-
timeout: Union[float, tuple[float, float], tuple[float, None], None] = None,
25+
timeout: Union[float, Tuple[float, float], Tuple[float, None], None] = None,
2626
verify: Union[bool, str] = True,
27-
cert: Union[bytes, str, tuple[Union[bytes, str], Union[bytes, str]], None] = None,
27+
cert: Union[bytes, str, Tuple[Union[bytes, str], Union[bytes, str]], None] = None,
2828
proxies: Optional[Mapping[str, str]] = None,
2929
) -> Response:
3030
timeout = timeout or self.timeout

tests/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
but are used across multiple test files.
66
"""
77

8+
from __future__ import annotations
9+
810
import os
911
import subprocess
10-
from typing import Any, Dict
12+
from typing import Any
1113

1214

1315
def run_in_venv(
14-
venv_info: Dict[str, Any], cmd: str, check: bool = True, **kwargs: Any
16+
venv_info: dict[str, Any], cmd: str, check: bool = True, **kwargs: Any
1517
) -> subprocess.CompletedProcess[str]:
1618
"""
1719
Run a command in an isolated virtual environment.

0 commit comments

Comments
 (0)