Skip to content

Commit efe78a3

Browse files
committed
error: "dict" is not subscriptable, use "typing.Dict" instead
Signed-off-by: Mattt Zmuda <mattt@replicate.com>
1 parent deb92e0 commit efe78a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

replicate/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
import re
33
from json import JSONDecodeError
4-
from typing import Any, Iterator, Optional, Union
4+
from typing import Any, Dict, Iterator, Optional, Union
55

66
import requests
77
from requests.adapters import HTTPAdapter, Retry
@@ -81,7 +81,7 @@ def _request(self, method: str, path: str, **kwargs) -> requests.Response:
8181
raise ReplicateError(f"HTTP error: {resp.status_code, resp.reason}")
8282
return resp
8383

84-
def _headers(self) -> dict[str, str]:
84+
def _headers(self) -> Dict[str, str]:
8585
return {
8686
"Authorization": f"Token {self._api_token()}",
8787
"User-Agent": f"replicate-python@{__version__}",

0 commit comments

Comments
 (0)