summaryrefslogtreecommitdiffstats
path: root/sqlglot/_typing.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-25 08:20:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-25 08:20:09 +0000
commit4554ab4c7d6b2bbbaa6f4d0b810bf477d1a505a6 (patch)
tree8f4f60a82ab9cd6dcd41397e4ecb2960c332b209 /sqlglot/_typing.py
parentReleasing debian version 18.5.1-1. (diff)
downloadsqlglot-4554ab4c7d6b2bbbaa6f4d0b810bf477d1a505a6.tar.xz
sqlglot-4554ab4c7d6b2bbbaa6f4d0b810bf477d1a505a6.zip
Merging upstream version 18.7.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, 5 insertions, 0 deletions
diff --git a/sqlglot/_typing.py b/sqlglot/_typing.py
index 2acbbf7..86d965a 100644
--- a/sqlglot/_typing.py
+++ b/sqlglot/_typing.py
@@ -4,5 +4,10 @@ import typing as t
import sqlglot
+# 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)
+
E = t.TypeVar("E", bound="sqlglot.exp.Expression")
T = t.TypeVar("T")