summaryrefslogtreecommitdiffstats
path: root/sqlglot/_typing.py
blob: 86d965afd9b2912c689d6baf054b12d39f95c2df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
from __future__ import annotations

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")