Skip to content

Commit 4cd49b3

Browse files
committed
cosmetic enhancements
1 parent 42a113c commit 4cd49b3

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

sqlmesh/core/snapshot/definition.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,9 +1487,9 @@ class SnapshotTableCleanupTask(PydanticModel):
14871487
dev_table_only: bool
14881488

14891489

1490-
SnapshotIdLike = t.Union[SnapshotId, SnapshotTableInfo, Snapshot]
1490+
SnapshotIdLike = t.Union[SnapshotId, SnapshotTableInfo, MinimalSnapshot, Snapshot]
14911491
SnapshotInfoLike = t.Union[SnapshotTableInfo, Snapshot]
1492-
SnapshotNameVersionLike = t.Union[SnapshotNameVersion, SnapshotTableInfo, Snapshot]
1492+
SnapshotNameVersionLike = t.Union[SnapshotNameVersion, SnapshotTableInfo, MinimalSnapshot, Snapshot]
14931493

14941494

14951495
class DeployabilityIndex(PydanticModel, frozen=True):

sqlmesh/core/state_sync/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ def get_snapshots_by_names(
105105
current_ts: t.Optional[int] = None,
106106
exclude_expired: bool = True,
107107
) -> t.Set[MinimalSnapshot]:
108-
"""Return the snapshot id's for all versions of the specified snapshot names.
108+
"""Return the snapshot records for all versions of the specified snapshot names.
109109
110110
Args:
111-
snapshot_names: Iterable of snapshot names to fetch all snapshot for
111+
snapshot_names: Iterable of snapshot names to fetch all snapshot records for
112112
current_ts: Sets the current time for identifying which snapshots have expired so they can be excluded (only relevant if :exclude_expired=True)
113113
exclude_expired: Whether or not to return the snapshot id's of expired snapshots in the result
114114

sqlmesh/core/state_sync/db/snapshot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,15 +313,15 @@ def get_snapshots_by_names(
313313
current_ts: t.Optional[int] = None,
314314
exclude_expired: bool = True,
315315
) -> t.Set[MinimalSnapshot]:
316-
"""Return the snapshot id's for all versions of the specified snapshot names.
316+
"""Return the snapshot records for all versions of the specified snapshot names.
317317
318318
Args:
319-
snapshot_names: Iterable of snapshot names to fetch all snapshot id's for
319+
snapshot_names: Iterable of snapshot names to fetch all snapshot records for
320320
current_ts: Sets the current time for identifying which snapshots have expired so they can be excluded (only relevant if :exclude_expired=True)
321321
exclude_expired: Whether or not to return the snapshot id's of expired snapshots in the result
322322
323323
Returns:
324-
A dictionary mapping snapshot names to a list of relevant snapshot id's
324+
A set containing all the matched snapshot records. To fetch full snapshots, pass it into StateSync.get_snapshots()
325325
"""
326326
if not snapshot_names:
327327
return set()

0 commit comments

Comments
 (0)