@@ -288,6 +288,7 @@ def show_model_difference_summary(
288288 environment_naming_info : EnvironmentNamingInfo ,
289289 default_catalog : t .Optional [str ],
290290 no_diff : bool = True ,
291+ show_environment_statements : bool = True ,
291292 ) -> None :
292293 """Displays a summary of differences for the given models."""
293294
@@ -557,6 +558,7 @@ def show_model_difference_summary(
557558 environment_naming_info : EnvironmentNamingInfo ,
558559 default_catalog : t .Optional [str ],
559560 no_diff : bool = True ,
561+ show_environment_statements : bool = True ,
560562 ignored_snapshot_ids : t .Optional [t .Set [SnapshotId ]] = None ,
561563 ) -> None :
562564 pass
@@ -1316,6 +1318,7 @@ def show_model_difference_summary(
13161318 environment_naming_info : EnvironmentNamingInfo ,
13171319 default_catalog : t .Optional [str ],
13181320 no_diff : bool = True ,
1321+ show_environment_statements : bool = True ,
13191322 ) -> None :
13201323 """Shows a summary of the differences.
13211324
@@ -1358,9 +1361,11 @@ def show_model_difference_summary(
13581361 if context_diff .has_requirement_changes :
13591362 self ._print (f"[bold]Requirements:\n { context_diff .requirements_diff ()} " )
13601363
1361- if context_diff .has_environment_statements_changes :
1364+ if context_diff .has_environment_statements_changes and show_environment_statements :
13621365 self ._print ("[bold]Environment statements:\n " )
1363- for type , diff in context_diff .environment_statements_diff ():
1366+ for type , diff in context_diff .environment_statements_diff (
1367+ include_python_env = not context_diff .is_new_environment
1368+ ):
13641369 self ._print (Syntax (diff , type , line_numbers = False ))
13651370
13661371 self ._show_summary_tree_for (
@@ -1542,6 +1547,7 @@ def _prompt_categorize(
15421547 plan .context_diff ,
15431548 plan .environment_naming_info ,
15441549 default_catalog = default_catalog ,
1550+ show_environment_statements = not no_diff ,
15451551 )
15461552
15471553 if not no_diff :
@@ -2489,6 +2495,7 @@ def show_model_difference_summary(
24892495 environment_naming_info : EnvironmentNamingInfo ,
24902496 default_catalog : t .Optional [str ],
24912497 no_diff : bool = True ,
2498+ show_environment_statements : bool = True ,
24922499 ) -> None :
24932500 """Shows a summary of the differences.
24942501
@@ -2514,9 +2521,11 @@ def show_model_difference_summary(
25142521 if context_diff .has_requirement_changes :
25152522 self ._print (f"Requirements:\n { context_diff .requirements_diff ()} " )
25162523
2517- if context_diff .has_environment_statements_changes :
2524+ if context_diff .has_environment_statements_changes and show_environment_statements :
25182525 self ._print ("[bold]Environment statements:\n " )
2519- for _ , diff in context_diff .environment_statements_diff ():
2526+ for _ , diff in context_diff .environment_statements_diff (
2527+ include_python_env = not context_diff .is_new_environment
2528+ ):
25202529 self ._print (diff )
25212530
25222531 added_snapshots = {context_diff .snapshots [s_id ] for s_id in context_diff .added }
@@ -3027,15 +3036,18 @@ def show_model_difference_summary(
30273036 environment_naming_info : EnvironmentNamingInfo ,
30283037 default_catalog : t .Optional [str ],
30293038 no_diff : bool = True ,
3039+ show_environment_statements : bool = True ,
30303040 ) -> None :
30313041 self ._write ("Model Difference Summary:" )
30323042
30333043 if context_diff .has_requirement_changes :
30343044 self ._write (f"Requirements:\n { context_diff .requirements_diff ()} " )
30353045
3036- if context_diff .has_environment_statements_changes :
3046+ if context_diff .has_environment_statements_changes and show_environment_statements :
30373047 self ._write ("Environment statements:\n " )
3038- for _ , diff in context_diff .environment_statements_diff ():
3048+ for _ , diff in context_diff .environment_statements_diff (
3049+ include_python_env = not context_diff .is_new_environment
3050+ ):
30393051 self ._write (diff )
30403052
30413053 for added in context_diff .new_snapshots :
0 commit comments