sqlspec 0.10.0__py3-none-any.whl → 0.11.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of sqlspec might be problematic. Click here for more details.

sqlspec/_typing.py CHANGED
@@ -6,15 +6,7 @@ This is used to ensure compatibility when one or more of the libraries are insta
6
6
 
7
7
  from collections.abc import Iterable, Mapping
8
8
  from enum import Enum
9
- from typing import (
10
- Any,
11
- ClassVar,
12
- Final,
13
- Protocol,
14
- Union,
15
- cast,
16
- runtime_checkable,
17
- )
9
+ from typing import Any, ClassVar, Final, Optional, Protocol, Union, cast, runtime_checkable
18
10
 
19
11
  from typing_extensions import Literal, TypeVar, dataclass_transform
20
12
 
@@ -50,9 +42,9 @@ except ImportError:
50
42
  self,
51
43
  /,
52
44
  *,
53
- include: "Optional[Any]" = None,
54
- exclude: "Optional[Any]" = None,
55
- context: "Optional[Any]" = None,
45
+ include: Optional[Any] = None,
46
+ exclude: Optional[Any] = None,
47
+ context: Optional[Any] = None,
56
48
  by_alias: bool = False,
57
49
  exclude_unset: bool = False,
58
50
  exclude_defaults: bool = False,
@@ -68,9 +60,9 @@ except ImportError:
68
60
  self,
69
61
  /,
70
62
  *,
71
- include: "Optional[Any]" = None,
72
- exclude: "Optional[Any]" = None,
73
- context: "Optional[Any]" = None,
63
+ include: Optional[Any] = None,
64
+ exclude: Optional[Any] = None,
65
+ context: Optional[Any] = None,
74
66
  by_alias: bool = False,
75
67
  exclude_unset: bool = False,
76
68
  exclude_defaults: bool = False,
@@ -90,9 +82,9 @@ except ImportError:
90
82
  self,
91
83
  type: Any, # noqa: A002
92
84
  *,
93
- config: "Optional[Any]" = None,
85
+ config: Optional[Any] = None,
94
86
  _parent_depth: int = 2,
95
- module: "Optional[str]" = None,
87
+ module: Optional[str] = None,
96
88
  ) -> None:
97
89
  """Init"""
98
90
 
@@ -101,10 +93,10 @@ except ImportError:
101
93
  object: Any,
102
94
  /,
103
95
  *,
104
- strict: "Optional[bool]" = None,
105
- from_attributes: "Optional[bool]" = None,
106
- context: "Optional[dict[str, Any]]" = None,
107
- experimental_allow_partial: "Union[bool, Literal['off', 'on', 'trailing-strings']]" = False,
96
+ strict: Optional[bool] = None,
97
+ from_attributes: Optional[bool] = None,
98
+ context: Optional[dict[str, Any]] = None,
99
+ experimental_allow_partial: Union[bool, Literal["off", "on", "trailing-strings"]] = False,
108
100
  ) -> "T_co":
109
101
  """Stub"""
110
102
  return cast("T_co", object)
@@ -136,16 +128,16 @@ except ImportError:
136
128
  class Struct(Protocol): # type: ignore[no-redef]
137
129
  """Placeholder Implementation"""
138
130
 
139
- __struct_fields__: "ClassVar[tuple[str, ...]]"
131
+ __struct_fields__: ClassVar[tuple[str, ...]]
140
132
 
141
133
  def convert( # type: ignore[no-redef]
142
134
  obj: Any,
143
- type: "Union[Any, type[T]]", # noqa: A002
135
+ type: Union[Any, type[T]], # noqa: A002
144
136
  *,
145
137
  strict: bool = True,
146
138
  from_attributes: bool = False,
147
- dec_hook: "Optional[Callable[[type, Any], Any]]" = None,
148
- builtin_types: "Union[Iterable[type], None]" = None,
139
+ dec_hook: Optional[Callable[[type, Any], Any]] = None,
140
+ builtin_types: Optional[Iterable[type]] = None,
149
141
  str_keys: bool = False,
150
142
  ) -> "Union[T, Any]":
151
143
  """Placeholder implementation"""
@@ -172,10 +164,10 @@ except ImportError:
172
164
  def __init__(self, backend: Any, data_as_builtins: Any) -> None:
173
165
  """Placeholder init"""
174
166
 
175
- def create_instance(self, **kwargs: Any) -> "T":
167
+ def create_instance(self, **kwargs: Any) -> T:
176
168
  return cast("T", kwargs)
177
169
 
178
- def update_instance(self, instance: "T", **kwargs: Any) -> "T":
170
+ def update_instance(self, instance: T, **kwargs: Any) -> T:
179
171
  """Placeholder implementation"""
180
172
  return cast("T", kwargs)
181
173
 
@@ -214,15 +206,15 @@ except ImportError:
214
206
  def from_arrays(
215
207
  self,
216
208
  arrays: list[Any],
217
- names: "Optional[list[str]]" = None,
218
- schema: "Optional[Any]" = None,
219
- metadata: "Optional[Mapping[str, Any]]" = None,
209
+ names: Optional[list[str]] = None,
210
+ schema: Optional[Any] = None,
211
+ metadata: Optional[Mapping[str, Any]] = None,
220
212
  ) -> Any: ...
221
213
  def from_pydict(
222
214
  self,
223
215
  mapping: dict[str, Any],
224
- schema: "Optional[Any]" = None,
225
- metadata: "Optional[Mapping[str, Any]]" = None,
216
+ schema: Optional[Any] = None,
217
+ metadata: Optional[Mapping[str, Any]] = None,
226
218
  ) -> Any: ...
227
219
  def from_batches(self, batches: Iterable[Any], schema: Optional[Any] = None) -> Any: ...
228
220
 
@@ -38,7 +38,7 @@ class AdbcConfig(NoPoolSyncConfig["AdbcConnection", "AdbcDriver"]):
38
38
  pool_instance: None = field(init=False, default=None, hash=False)
39
39
  """No connection pool is used for ADBC connections"""
40
40
 
41
- def _set_adbc(self) -> str: # noqa: PLR0912
41
+ def _set_adbc(self) -> str:
42
42
  """Identify the driver type based on the URI (if provided) or preset driver name.
43
43
 
44
44
  Raises: