sqlmesh 0.205.1.dev16__py3-none-any.whl → 0.205.1.dev18__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.
- sqlmesh/_version.py +2 -2
- sqlmesh/core/linter/rule.py +2 -0
- sqlmesh/core/linter/rules/builtin.py +4 -0
- sqlmesh/lsp/context.py +7 -3
- {sqlmesh-0.205.1.dev16.dist-info → sqlmesh-0.205.1.dev18.dist-info}/METADATA +2 -2
- {sqlmesh-0.205.1.dev16.dist-info → sqlmesh-0.205.1.dev18.dist-info}/RECORD +10 -10
- {sqlmesh-0.205.1.dev16.dist-info → sqlmesh-0.205.1.dev18.dist-info}/WHEEL +0 -0
- {sqlmesh-0.205.1.dev16.dist-info → sqlmesh-0.205.1.dev18.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.205.1.dev16.dist-info → sqlmesh-0.205.1.dev18.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.205.1.dev16.dist-info → sqlmesh-0.205.1.dev18.dist-info}/top_level.txt +0 -0
sqlmesh/_version.py
CHANGED
|
@@ -17,5 +17,5 @@ __version__: str
|
|
|
17
17
|
__version_tuple__: VERSION_TUPLE
|
|
18
18
|
version_tuple: VERSION_TUPLE
|
|
19
19
|
|
|
20
|
-
__version__ = version = '0.205.1.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 205, 1, '
|
|
20
|
+
__version__ = version = '0.205.1.dev18'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 205, 1, 'dev18')
|
sqlmesh/core/linter/rule.py
CHANGED
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import abc
|
|
4
4
|
from dataclasses import dataclass
|
|
5
|
+
from pathlib import Path
|
|
5
6
|
|
|
6
7
|
from sqlmesh.core.model import Model
|
|
7
8
|
|
|
@@ -43,6 +44,7 @@ class Range:
|
|
|
43
44
|
class TextEdit:
|
|
44
45
|
"""A text edit to apply to a file."""
|
|
45
46
|
|
|
47
|
+
path: Path
|
|
46
48
|
range: Range
|
|
47
49
|
new_text: str
|
|
48
50
|
|
|
@@ -53,12 +53,16 @@ class NoSelectStar(Rule):
|
|
|
53
53
|
columns = model.columns_to_types
|
|
54
54
|
if not columns:
|
|
55
55
|
return None
|
|
56
|
+
path = model._path
|
|
57
|
+
if path is None:
|
|
58
|
+
return None
|
|
56
59
|
new_text = ", ".join(columns.keys())
|
|
57
60
|
return [
|
|
58
61
|
Fix(
|
|
59
62
|
title="Replace SELECT * with explicit column list",
|
|
60
63
|
edits=[
|
|
61
64
|
TextEdit(
|
|
65
|
+
path=path,
|
|
62
66
|
range=violation_range,
|
|
63
67
|
new_text=new_text,
|
|
64
68
|
)
|
sqlmesh/lsp/context.py
CHANGED
|
@@ -274,9 +274,13 @@ class LSPContext:
|
|
|
274
274
|
# Create code actions for each fix
|
|
275
275
|
for fix in found_violation.fixes:
|
|
276
276
|
# Convert our Fix to LSP TextEdits
|
|
277
|
-
|
|
277
|
+
changes: t.Dict[str, t.List[types.TextEdit]] = {}
|
|
278
278
|
for edit in fix.edits:
|
|
279
|
-
|
|
279
|
+
uri_key = URI.from_path(edit.path).value
|
|
280
|
+
if uri_key not in changes:
|
|
281
|
+
changes[uri_key] = []
|
|
282
|
+
# Create a TextEdit for the LSP
|
|
283
|
+
changes[uri_key].append(
|
|
280
284
|
types.TextEdit(
|
|
281
285
|
range=types.Range(
|
|
282
286
|
start=types.Position(
|
|
@@ -297,7 +301,7 @@ class LSPContext:
|
|
|
297
301
|
title=fix.title,
|
|
298
302
|
kind=types.CodeActionKind.QuickFix,
|
|
299
303
|
diagnostics=[diagnostic],
|
|
300
|
-
edit=types.WorkspaceEdit(changes=
|
|
304
|
+
edit=types.WorkspaceEdit(changes=changes),
|
|
301
305
|
)
|
|
302
306
|
code_actions.append(code_action)
|
|
303
307
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlmesh
|
|
3
|
-
Version: 0.205.1.
|
|
3
|
+
Version: 0.205.1.dev18
|
|
4
4
|
Summary: Next-generation data transformation framework
|
|
5
5
|
Author-email: "TobikoData Inc." <engineering@tobikodata.com>
|
|
6
6
|
License: Apache License
|
|
@@ -222,7 +222,7 @@ Requires-Dist: astor
|
|
|
222
222
|
Requires-Dist: click
|
|
223
223
|
Requires-Dist: croniter
|
|
224
224
|
Requires-Dist: duckdb!=0.10.3,>=0.10.0
|
|
225
|
-
Requires-Dist: dateparser
|
|
225
|
+
Requires-Dist: dateparser<=1.2.1
|
|
226
226
|
Requires-Dist: hyperscript>=0.1.0
|
|
227
227
|
Requires-Dist: importlib-metadata; python_version < "3.12"
|
|
228
228
|
Requires-Dist: ipywidgets
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
sqlmesh/__init__.py,sha256=QjwaamJIdW7voXoS880yAx7tHm-Im4_mqGA-XJgafos,7631
|
|
2
|
-
sqlmesh/_version.py,sha256=
|
|
2
|
+
sqlmesh/_version.py,sha256=4ktiNonXiiRqRGHJaSdqV-TaQGwyBMXRQGggZaP_9qY,530
|
|
3
3
|
sqlmesh/magics.py,sha256=bEzYqXHcM0P3CjyUZ1O9arlmXAdLAhoglKbQ29fD9AE,41842
|
|
4
4
|
sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -78,9 +78,9 @@ sqlmesh/core/engine_adapter/trino.py,sha256=Tws3GxqnC6BmXFohqru1TDxsgPH-21qV6Oky
|
|
|
78
78
|
sqlmesh/core/linter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
79
79
|
sqlmesh/core/linter/definition.py,sha256=JDJTkhByUw4Tr3nF-BOHKFAx_eASQqEqzX6AUVQUz8I,5659
|
|
80
80
|
sqlmesh/core/linter/helpers.py,sha256=HNNSiuKB2o4Z2AGbwgrGr9hE0lQnIR7VHQfj8D8M_Jw,5202
|
|
81
|
-
sqlmesh/core/linter/rule.py,sha256=
|
|
81
|
+
sqlmesh/core/linter/rule.py,sha256=MgFwfvlGEvh4nijsxc7Bbk_S9ctJ_m-nKCom9LIN4W4,3734
|
|
82
82
|
sqlmesh/core/linter/rules/__init__.py,sha256=gevzfb67vFqckTCoVAe_TBGf6hQ-YtE1_YuGuXyh1L0,77
|
|
83
|
-
sqlmesh/core/linter/rules/builtin.py,sha256=
|
|
83
|
+
sqlmesh/core/linter/rules/builtin.py,sha256=RmKZrp3EWLSmP-X_gT2gl_SVmIImPoZjwJWki1sYBIo,8180
|
|
84
84
|
sqlmesh/core/metric/__init__.py,sha256=H1HmoD5IwN4YWe9iJXyueLYNmTQFZwok5nSWNJcZIBQ,237
|
|
85
85
|
sqlmesh/core/metric/definition.py,sha256=Yd5aVgsZCDPJ43aGP7WqtzZOuuSUtB8uJGVA6Jw9x9M,7201
|
|
86
86
|
sqlmesh/core/metric/rewriter.py,sha256=GiSTHfn2kinqCfNPYgZPRk93JFLzVaaejHtHDQ0yXZI,7326
|
|
@@ -166,7 +166,7 @@ sqlmesh/integrations/github/cicd/controller.py,sha256=XZIh8y7527sBcTMCyXyVxulieF
|
|
|
166
166
|
sqlmesh/lsp/api.py,sha256=_lA_buSPZFIoLJuINbS53LbNOOaHp3orb0uFTE3aCqI,2328
|
|
167
167
|
sqlmesh/lsp/commands.py,sha256=7tZPePSH-IwBYmXJPIlqGM7pi4rOCLEtc3fKJglAxZs,72
|
|
168
168
|
sqlmesh/lsp/completions.py,sha256=7Lhboh6xyoMJ3kkHG3aZz1xVbDwKiXeQKdIRj5xlUOA,6674
|
|
169
|
-
sqlmesh/lsp/context.py,sha256=
|
|
169
|
+
sqlmesh/lsp/context.py,sha256=xaKZycAycH3-Ugzyg0dLni3shcClOEo1xq5OV2cxccU,19423
|
|
170
170
|
sqlmesh/lsp/custom.py,sha256=3gfN_z9IXKOhTGkaZX7V5I8WUmI4z1GWe1sViOo92pw,3980
|
|
171
171
|
sqlmesh/lsp/errors.py,sha256=3NMim_5J00Eypz7t8b7XbkBfy8gIsRkeq-VcjD4COtc,1489
|
|
172
172
|
sqlmesh/lsp/helpers.py,sha256=EFc1u3-b7kSv5-tNwmKUDxId72RCLDBnN2lLTgRSzzQ,1020
|
|
@@ -287,7 +287,7 @@ sqlmesh/utils/pydantic.py,sha256=o_NsXbIpDqNpUA1Uc5xF0ZzoXQYYB0DfHwdRxBwXPNk,120
|
|
|
287
287
|
sqlmesh/utils/rich.py,sha256=cwQ5nJ6sgz64xHtoh6_ec7ReV5YpsOGhMtUJnwoRfEI,3549
|
|
288
288
|
sqlmesh/utils/windows.py,sha256=r7Yin4WEwbvH7sKA3hOJtRsclmscNuBeCklCfVPvtQs,611
|
|
289
289
|
sqlmesh/utils/yaml.py,sha256=hvo5lmybYLcIx4p6CQwufS8X4MbwS60lEBnCmYJCXmU,2336
|
|
290
|
-
sqlmesh-0.205.1.
|
|
290
|
+
sqlmesh-0.205.1.dev18.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
291
291
|
web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
292
292
|
web/client/dist/index.html,sha256=SXykdSRNgrT1k6I2dPZPEfpxPjIsi8-yVFijt-naSA4,5472
|
|
293
293
|
web/client/dist/assets/Audits-Jm353fhk.js,sha256=ry6b5IKT3hLAfD5C3T2BqxulfauEV0n0YZ2vsP4eQ_U,1041
|
|
@@ -405,8 +405,8 @@ web/server/api/endpoints/models.py,sha256=kwj0s7uve3iZSMfmjkoPVMFMeY1sD0peTeyrWf
|
|
|
405
405
|
web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
|
|
406
406
|
web/server/api/endpoints/plan.py,sha256=bbbY50W_2MsZSTxOHWMKz0tbIm75nsRSlPy8GI2fg9Q,9306
|
|
407
407
|
web/server/api/endpoints/table_diff.py,sha256=SCy3-pr5x6bEEiOaZGCDbiHQhpgxwmnz3Acqa2Ie6jI,2090
|
|
408
|
-
sqlmesh-0.205.1.
|
|
409
|
-
sqlmesh-0.205.1.
|
|
410
|
-
sqlmesh-0.205.1.
|
|
411
|
-
sqlmesh-0.205.1.
|
|
412
|
-
sqlmesh-0.205.1.
|
|
408
|
+
sqlmesh-0.205.1.dev18.dist-info/METADATA,sha256=-F7zoVQalU-b6jAk614iGsO5SDsmCouy4-qKb13HjXQ,26686
|
|
409
|
+
sqlmesh-0.205.1.dev18.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
410
|
+
sqlmesh-0.205.1.dev18.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
|
|
411
|
+
sqlmesh-0.205.1.dev18.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
|
|
412
|
+
sqlmesh-0.205.1.dev18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|