Skip to content

Commit 444fe65

Browse files
committed
fixed typing for python 3.7+ compatibility
1 parent 5ce2013 commit 444fe65

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

apimatic_core/templating/template_engine.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import List, Optional, Callable, Union
1+
from typing import List, Optional, Callable, Union, Tuple
22
from apimatic_core_interfaces.http.request import Request
33
from apimatic_core.templating.template_resolver import ExprResolver, MethodResolver, UrlResolver, PathResolver, HeaderResolver, \
44
QueryResolver, JsonBodyPointerResolver
@@ -115,7 +115,7 @@ def __raw_body_bytes(req: Request) -> bytes:
115115

116116
# inside class TemplateEngine
117117
@staticmethod
118-
def __tokenize(template: str) -> list[tuple[str, Union[bytes, str]]]:
118+
def __tokenize(template: str) -> List[Tuple[str, Union[bytes, str]]]:
119119
"""
120120
Tokenize in one pass using a simple state machine.
121121
Produces:
@@ -128,9 +128,9 @@ def __tokenize(template: str) -> list[tuple[str, Union[bytes, str]]]:
128128

129129
LIT, RAW_CANDIDATE, EXPR = 0, 1, 2
130130
state = LIT
131-
out: list[tuple[str, Union[bytes, str]]] = []
132-
buf: list[str] = []
133-
expr: list[str] = []
131+
out: List[Tuple[str, Union[bytes, str]]] = []
132+
buf: List[str] = []
133+
expr: List[str] = []
134134

135135
i = 0
136136
s = template

0 commit comments

Comments
 (0)