@@ -282,6 +282,7 @@ def show_model_difference_summary(
282282 environment_naming_info : EnvironmentNamingInfo ,
283283 default_catalog : t .Optional [str ],
284284 no_diff : bool = True ,
285+ show_environment_statements : bool = True ,
285286 ) -> None :
286287 """Displays a summary of differences for the given models."""
287288
@@ -555,6 +556,7 @@ def show_model_difference_summary(
555556 environment_naming_info : EnvironmentNamingInfo ,
556557 default_catalog : t .Optional [str ],
557558 no_diff : bool = True ,
559+ show_environment_statements : bool = True ,
558560 ignored_snapshot_ids : t .Optional [t .Set [SnapshotId ]] = None ,
559561 ) -> None :
560562 pass
@@ -1270,6 +1272,7 @@ def show_model_difference_summary(
12701272 environment_naming_info : EnvironmentNamingInfo ,
12711273 default_catalog : t .Optional [str ],
12721274 no_diff : bool = True ,
1275+ show_environment_statements : bool = True ,
12731276 ) -> None :
12741277 """Shows a summary of the differences.
12751278
@@ -1312,9 +1315,11 @@ def show_model_difference_summary(
13121315 if context_diff .has_requirement_changes :
13131316 self ._print (f"[bold]Requirements:\n { context_diff .requirements_diff ()} " )
13141317
1315- if context_diff .has_environment_statements_changes :
1318+ if context_diff .has_environment_statements_changes and show_environment_statements :
13161319 self ._print ("[bold]Environment statements:\n " )
1317- for type , diff in context_diff .environment_statements_diff ():
1320+ for type , diff in context_diff .environment_statements_diff (
1321+ include_python_env = not context_diff .is_new_environment
1322+ ):
13181323 self ._print (Syntax (diff , type , line_numbers = False ))
13191324
13201325 self ._show_summary_tree_for (
@@ -1496,6 +1501,7 @@ def _prompt_categorize(
14961501 plan .context_diff ,
14971502 plan .environment_naming_info ,
14981503 default_catalog = default_catalog ,
1504+ show_environment_statements = not no_diff ,
14991505 )
15001506
15011507 if not no_diff :
@@ -2443,6 +2449,7 @@ def show_model_difference_summary(
24432449 environment_naming_info : EnvironmentNamingInfo ,
24442450 default_catalog : t .Optional [str ],
24452451 no_diff : bool = True ,
2452+ show_environment_statements : bool = True ,
24462453 ) -> None :
24472454 """Shows a summary of the differences.
24482455
@@ -2468,9 +2475,11 @@ def show_model_difference_summary(
24682475 if context_diff .has_requirement_changes :
24692476 self ._print (f"Requirements:\n { context_diff .requirements_diff ()} " )
24702477
2471- if context_diff .has_environment_statements_changes :
2478+ if context_diff .has_environment_statements_changes and show_environment_statements :
24722479 self ._print ("[bold]Environment statements:\n " )
2473- for _ , diff in context_diff .environment_statements_diff ():
2480+ for _ , diff in context_diff .environment_statements_diff (
2481+ include_python_env = not context_diff .is_new_environment
2482+ ):
24742483 self ._print (diff )
24752484
24762485 added_snapshots = {context_diff .snapshots [s_id ] for s_id in context_diff .added }
@@ -2977,15 +2986,18 @@ def show_model_difference_summary(
29772986 environment_naming_info : EnvironmentNamingInfo ,
29782987 default_catalog : t .Optional [str ],
29792988 no_diff : bool = True ,
2989+ show_environment_statements : bool = True ,
29802990 ) -> None :
29812991 self ._write ("Model Difference Summary:" )
29822992
29832993 if context_diff .has_requirement_changes :
29842994 self ._write (f"Requirements:\n { context_diff .requirements_diff ()} " )
29852995
2986- if context_diff .has_environment_statements_changes :
2996+ if context_diff .has_environment_statements_changes and show_environment_statements :
29872997 self ._write ("Environment statements:\n " )
2988- for _ , diff in context_diff .environment_statements_diff ():
2998+ for _ , diff in context_diff .environment_statements_diff (
2999+ include_python_env = not context_diff .is_new_environment
3000+ ):
29893001 self ._write (diff )
29903002
29913003 for added in context_diff .new_snapshots :
0 commit comments