Skip to content

Commit 6e11713

Browse files
authored
update _typings.py
for dynamic import for different python versions
1 parent 3cff24b commit 6e11713

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/injective/chain_client/_typings.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import sys
22

3-
from typing import Literal, TypedDict
4-
# for python3.7, you need to change this to the followings
5-
# from typing_extensions import Literal, TypedDict
3+
if sys.version_info < (3, 8):
4+
from typing_extensions import Literal, TypedDict
5+
else:
6+
from typing import Literal, TypedDict
67

78
# Valid transaction broadcast modes for the `POST /txs` endpoint of the
89
# Cosmos REST API.

0 commit comments

Comments
 (0)