@@ -73,17 +73,13 @@ def main(ctx, no_gate, require_license_flag) -> None:
7373 type = click .Path (exists = True ),
7474 help = "Pulumi preview JSON file" ,
7575)
76- @click .option (
77- "-v" , "--verbose" , is_flag = True , help = "Show before/after details for each change"
78- )
76+ @click .option ("-v" , "--verbose" , is_flag = True , help = "Show before/after details for each change" )
7977@click .option (
8078 "--exit-on-destroy" ,
8179 is_flag = True ,
8280 help = "Exit with code 1 if the plan contains destructive changes (deletes or replaces)" ,
8381)
84- def preview (
85- terraform_file , cloudformation_file , pulumi_file , verbose , exit_on_destroy
86- ) -> None :
82+ def preview (terraform_file , cloudformation_file , pulumi_file , verbose , exit_on_destroy ) -> None :
8783 """Preview infrastructure changes from a plan file."""
8884 plan = _load_plan (terraform_file , cloudformation_file , pulumi_file )
8985 if plan is None :
@@ -131,9 +127,7 @@ def preview(
131127 default = None ,
132128 help = "Exit with code 1 if total monthly cost delta exceeds this value (e.g. 500 for $500)" ,
133129)
134- def cost (
135- terraform_file , cloudformation_file , pulumi_file , pricing_file , threshold
136- ) -> None :
130+ def cost (terraform_file , cloudformation_file , pulumi_file , pricing_file , threshold ) -> None :
137131 """Estimate monthly cost impact of infrastructure changes. (Pro feature)"""
138132 if _HAS_RH_LICENSE :
139133 from revenueholdings_license import require_tier
@@ -203,9 +197,7 @@ def _load_plan(
203197 if len (provided ) == 0 :
204198 return None
205199 if len (provided ) > 1 :
206- console .print (
207- "[red]Error: Provide only one source file (--tf, --cfn, or --pulumi)[/red]"
208- )
200+ console .print ("[red]Error: Provide only one source file (--tf, --cfn, or --pulumi)[/red]" )
209201 raise SystemExit (1 )
210202
211203 if terraform_file :
@@ -218,9 +210,7 @@ def _load_plan(
218210 return None
219211
220212
221- def _render_costs (
222- estimates : list [CostEstimate ], plan : DeployPlan , console : Console
223- ) -> None :
213+ def _render_costs (estimates : list [CostEstimate ], plan : DeployPlan , console : Console ) -> None :
224214 """Render cost estimates to the console."""
225215 from rich import box
226216 from rich .table import Table
@@ -253,9 +243,7 @@ def _render_costs(
253243 if total > 0 :
254244 console .print (f"\n [bold red]Total monthly increase: +${ total :.2f} [/bold red]" )
255245 elif total < 0 :
256- console .print (
257- f"\n [bold green]Total monthly decrease: -${ abs (total ):.2f} [/bold green]"
258- )
246+ console .print (f"\n [bold green]Total monthly decrease: -${ abs (total ):.2f} [/bold green]" )
259247 else :
260248 console .print ("\n [bold]Total monthly change: $0.00[/bold]" )
261249
0 commit comments