1
0
Fork 0

Merging upstream version 15.0.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 15:57:23 +01:00
parent 8deb804d23
commit fc63828ee4
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
167 changed files with 58268 additions and 51337 deletions

View file

@ -6,6 +6,7 @@
from __future__ import annotations
import logging
import typing as t
from sqlglot import expressions as exp
@ -45,12 +46,19 @@ from sqlglot.schema import MappingSchema as MappingSchema, Schema as Schema
from sqlglot.tokens import Tokenizer as Tokenizer, TokenType as TokenType
if t.TYPE_CHECKING:
from sqlglot._typing import E
from sqlglot.dialects.dialect import DialectType as DialectType
T = t.TypeVar("T", bound=Expression)
logger = logging.getLogger("sqlglot")
__version__ = "12.2.0"
try:
from sqlglot._version import __version__, __version_tuple__
except ImportError:
logger.error(
"Unable to set __version__, run `pip install -e .` or `python setup.py develop` first."
)
pretty = False
"""Whether to format generated SQL by default."""
@ -79,9 +87,9 @@ def parse(sql: str, read: DialectType = None, **opts) -> t.List[t.Optional[Expre
def parse_one(
sql: str,
read: None = None,
into: t.Type[T] = ...,
into: t.Type[E] = ...,
**opts,
) -> T:
) -> E:
...
@ -89,9 +97,9 @@ def parse_one(
def parse_one(
sql: str,
read: DialectType,
into: t.Type[T],
into: t.Type[E],
**opts,
) -> T:
) -> E:
...