@@ -1156,7 +1156,6 @@ def update_signal_progress(
11561156 # Display signal name
11571157 tree = Tree (f"[{ signal_idx + 1 } /{ total_signals } ] { signal_name } { duration :.2f} s" )
11581158
1159- # TODO: what about full models and other cases where these lists can be empty?
11601159 check_str = ", " .join (check_display ) if check_display else "no intervals"
11611160 tree .add (f"check: { check_str } " )
11621161
@@ -3938,23 +3937,17 @@ def _format_audits_errors(error: NodeAuditsErrors) -> str:
39383937 return " " + "\n " .join (error_messages )
39393938
39403939
3941- def _format_interval (snapshot : Snapshot , interval : Interval , prefix : str = "" ) -> str :
3940+ def _format_interval (snapshot : Snapshot , interval : Interval ) -> str :
39423941 """Format an interval with an optional prefix."""
3943- if snapshot .is_model and (
3944- snapshot .model .kind .is_incremental
3945- or snapshot .model .kind .is_managed
3946- or snapshot .model .kind .is_custom
3947- ):
3948- inclusive_interval = make_inclusive (interval [0 ], interval [1 ])
3949- if snapshot .model .interval_unit .is_date_granularity :
3950- base = f"{ to_ds (inclusive_interval [0 ])} - { to_ds (inclusive_interval [1 ])} "
3951- elif inclusive_interval [0 ].date () == inclusive_interval [1 ].date ():
3952- # omit end date if interval start/end on same day
3953- base = f"{ to_ds (inclusive_interval [0 ])} { inclusive_interval [0 ].strftime ('%H:%M:%S' )} -{ inclusive_interval [1 ].strftime ('%H:%M:%S' )} "
3954- else :
3955- base = f"{ inclusive_interval [0 ].strftime ('%Y-%m-%d %H:%M:%S' )} - { inclusive_interval [1 ].strftime ('%Y-%m-%d %H:%M:%S' )} "
3956- return f"{ prefix } { base } " if prefix else base
3957- return ""
3942+ inclusive_interval = make_inclusive (interval [0 ], interval [1 ])
3943+ if snapshot .model .interval_unit .is_date_granularity :
3944+ return f"{ to_ds (inclusive_interval [0 ])} - { to_ds (inclusive_interval [1 ])} "
3945+
3946+ if inclusive_interval [0 ].date () == inclusive_interval [1 ].date ():
3947+ # omit end date if interval start/end on same day
3948+ return f"{ to_ds (inclusive_interval [0 ])} { inclusive_interval [0 ].strftime ('%H:%M:%S' )} -{ inclusive_interval [1 ].strftime ('%H:%M:%S' )} "
3949+
3950+ return f"{ inclusive_interval [0 ].strftime ('%Y-%m-%d %H:%M:%S' )} - { inclusive_interval [1 ].strftime ('%Y-%m-%d %H:%M:%S' )} "
39583951
39593952
39603953def _format_signal_interval (snapshot : Snapshot , interval : Interval ) -> str :
@@ -3964,7 +3957,15 @@ def _format_signal_interval(snapshot: Snapshot, interval: Interval) -> str:
39643957
39653958def _format_evaluation_model_interval (snapshot : Snapshot , interval : Interval ) -> str :
39663959 """Format an interval for evaluation output (with 'insert' prefix)."""
3967- return _format_interval (snapshot , interval , prefix = "insert" )
3960+ if snapshot .is_model and (
3961+ snapshot .model .kind .is_incremental
3962+ or snapshot .model .kind .is_managed
3963+ or snapshot .model .kind .is_custom
3964+ ):
3965+ formatted_interval = _format_interval (snapshot , interval )
3966+ return f"insert { formatted_interval } "
3967+
3968+ return ""
39683969
39693970
39703971def _create_evaluation_model_annotation (snapshot : Snapshot , interval_info : t .Optional [str ]) -> str :
0 commit comments