Skip to content

Commit ac3c906

Browse files
committed
chore(dependencies): add pandas-stubs to development dependencies
- Included `pandas-stubs` in both `pyproject.toml` and `uv.lock` for improved type hinting support with pandas. - Updated `conftest.py` to specify type hints for `_backed_up_files` as a set of strings. - Simplified type hinting in `resource.py` by initializing `_count` without explicit type declaration.
1 parent 14cb896 commit ac3c906

File tree

4 files changed

+28
-4
lines changed

4 files changed

+28
-4
lines changed

dagster_sqlmesh/conftest.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
from sqlmesh.utils.date import TimeLike
2020

2121
from dagster_sqlmesh.config import SQLMeshContextConfig
22-
from dagster_sqlmesh.console import ConsoleEvent
2322
from dagster_sqlmesh.controller.base import PlanOptions, RunOptions
2423
from dagster_sqlmesh.controller.dagster import DagsterSQLMeshController
2524
from dagster_sqlmesh.events import ConsoleRecorder
@@ -125,7 +124,7 @@ def modify_model_file(self, model_name: str, new_content: str) -> None:
125124
"""
126125
model_path = self.get_model_path(model_name)
127126
if not hasattr(self, "_backed_up_files"):
128-
self._backed_up_files = set()
127+
self._backed_up_files: set[str] = set()
129128

130129
# Create backup if not already done
131130
if model_name not in self._backed_up_files:
@@ -307,7 +306,7 @@ def plan_and_run(
307306
skip_run: bool = False,
308307
plan_options: PlanOptions | None = None,
309308
run_options: RunOptions | None = None,
310-
) -> t.Iterator[ConsoleEvent] | None:
309+
) -> None:
311310
"""Runs plan and run on SQLMesh with the given configuration and record all of the generated events.
312311
313312
Args:

dagster_sqlmesh/resource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def __init__(self, sorted_dag: list[str], logger: logging.Logger) -> None:
3333

3434
def plan(self, batches: dict[Snapshot, int]) -> None:
3535
self._batches = batches
36-
self._count: dict[Snapshot, int] = {}
36+
self._count = {}
3737

3838
incomplete_names = set()
3939
for snapshot, count in self._batches.items():

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ dev = [
2525
"dagster-duckdb-polars>=0.24.2",
2626
"fastapi", # this is for sqlmesh ui
2727
"sse-starlette", # this is for sqlmesh ui
28+
"pandas-stubs"
2829
]
2930

3031
[build-system]

uv.lock

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)