We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66ae24c commit 97063ecCopy full SHA for 97063ec
1 file changed
sqlbind_t/template.py
@@ -1,7 +1,7 @@
1
import ast
2
import sys
3
from ast import Expression, FormattedValue
4
-from typing import TYPE_CHECKING, Iterator, List, Union
+from typing import Iterator, List, Union
5
6
from .compat import pyver
7
@@ -37,14 +37,11 @@ def __repr__(self) -> str:
37
return f'Interpolation({self.value!r})'
38
39
40
-if TYPE_CHECKING:
+if sys.version_info >= (3, 14):
41
from string.templatelib import Interpolation, Template
42
else:
43
- if HAS_TSTRINGS: # pragma: no cover
44
- from string.templatelib import Interpolation, Template
45
- else:
46
- Template = NTemplate
47
- Interpolation = NInterpolation
+ Template = NTemplate
+ Interpolation = NInterpolation
48
49
50
def parse_template(string: str, *, level: int = 1) -> Template:
0 commit comments