summaryrefslogtreecommitdiffstats
path: root/sqlglot/_typing.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-01-31 05:44:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-01-31 05:44:41 +0000
commit376de8b6892deca7dc5d83035c047f1e13eb67ea (patch)
tree334a1753cd914294aa99128fac3fb59bf14dc10f /sqlglot/_typing.py
parentReleasing debian version 20.9.0-1. (diff)
downloadsqlglot-376de8b6892deca7dc5d83035c047f1e13eb67ea.tar.xz
sqlglot-376de8b6892deca7dc5d83035c047f1e13eb67ea.zip
Merging upstream version 20.11.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/_typing.py')
-rw-r--r--sqlglot/_typing.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sqlglot/_typing.py b/sqlglot/_typing.py
index 86d965a..65f307e 100644
--- a/sqlglot/_typing.py
+++ b/sqlglot/_typing.py
@@ -4,10 +4,13 @@ import typing as t
import sqlglot
+if t.TYPE_CHECKING:
+ from typing_extensions import Literal as Lit # noqa
+
# A little hack for backwards compatibility with Python 3.7.
# For example, we might want a TypeVar for objects that support comparison e.g. SupportsRichComparisonT from typeshed.
# But Python 3.7 doesn't support Protocols, so we'd also need typing_extensions, which we don't want as a dependency.
A = t.TypeVar("A", bound=t.Any)
-
+B = t.TypeVar("B", bound="sqlglot.exp.Binary")
E = t.TypeVar("E", bound="sqlglot.exp.Expression")
T = t.TypeVar("T")