@@ -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
@@ -1330,6 +1332,7 @@ def show_model_difference_summary(
13301332 environment_naming_info : EnvironmentNamingInfo ,
13311333 default_catalog : t .Optional [str ],
13321334 no_diff : bool = True ,
1335+ show_environment_statements : bool = True ,
13331336 ) -> None :
13341337 """Shows a summary of the differences.
13351338
@@ -1372,9 +1375,11 @@ def show_model_difference_summary(
13721375 if context_diff .has_requirement_changes :
13731376 self ._print (f"[bold]Requirements:\n { context_diff .requirements_diff ()} " )
13741377
1375- if context_diff .has_environment_statements_changes :
1378+ if context_diff .has_environment_statements_changes and show_environment_statements :
13761379 self ._print ("[bold]Environment statements:\n " )
1377- for type , diff in context_diff .environment_statements_diff ():
1380+ for type , diff in context_diff .environment_statements_diff (
1381+ include_python_env = not context_diff .is_new_environment
1382+ ):
13781383 self ._print (Syntax (diff , type , line_numbers = False ))
13791384
13801385 self ._show_summary_tree_for (
@@ -1556,6 +1561,7 @@ def _prompt_categorize(
15561561 plan .context_diff ,
15571562 plan .environment_naming_info ,
15581563 default_catalog = default_catalog ,
1564+ show_environment_statements = not no_diff ,
15591565 )
15601566
15611567 if not no_diff :
@@ -2503,6 +2509,7 @@ def show_model_difference_summary(
25032509 environment_naming_info : EnvironmentNamingInfo ,
25042510 default_catalog : t .Optional [str ],
25052511 no_diff : bool = True ,
2512+ show_environment_statements : bool = True ,
25062513 ) -> None :
25072514 """Shows a summary of the differences.
25082515
@@ -2528,9 +2535,11 @@ def show_model_difference_summary(
25282535 if context_diff .has_requirement_changes :
25292536 self ._print (f"Requirements:\n { context_diff .requirements_diff ()} " )
25302537
2531- if context_diff .has_environment_statements_changes :
2538+ if context_diff .has_environment_statements_changes and show_environment_statements :
25322539 self ._print ("[bold]Environment statements:\n " )
2533- for _ , diff in context_diff .environment_statements_diff ():
2540+ for _ , diff in context_diff .environment_statements_diff (
2541+ include_python_env = not context_diff .is_new_environment
2542+ ):
25342543 self ._print (diff )
25352544
25362545 added_snapshots = {context_diff .snapshots [s_id ] for s_id in context_diff .added }
@@ -3041,15 +3050,18 @@ def show_model_difference_summary(
30413050 environment_naming_info : EnvironmentNamingInfo ,
30423051 default_catalog : t .Optional [str ],
30433052 no_diff : bool = True ,
3053+ show_environment_statements : bool = True ,
30443054 ) -> None :
30453055 self ._write ("Model Difference Summary:" )
30463056
30473057 if context_diff .has_requirement_changes :
30483058 self ._write (f"Requirements:\n { context_diff .requirements_diff ()} " )
30493059
3050- if context_diff .has_environment_statements_changes :
3060+ if context_diff .has_environment_statements_changes and show_environment_statements :
30513061 self ._write ("Environment statements:\n " )
3052- for _ , diff in context_diff .environment_statements_diff ():
3062+ for _ , diff in context_diff .environment_statements_diff (
3063+ include_python_env = not context_diff .is_new_environment
3064+ ):
30533065 self ._write (diff )
30543066
30553067 for added in context_diff .new_snapshots :
0 commit comments