Skip to content

Commit

Permalink
Format python
Browse files Browse the repository at this point in the history
  • Loading branch information
Frassle committed Nov 4, 2022
1 parent 7279aa0 commit b4a2f2b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 1 addition & 3 deletions sdk/python/lib/pulumi/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,9 +715,7 @@ def expand_providers(providers) -> Optional[Sequence["ProviderResource"]]:
else source.retain_on_delete
)
dest.deleted_with = (
dest.deleted_with
if source.deleted_with is None
else source.deleted_with
dest.deleted_with if source.deleted_with is None else source.deleted_with
)

# Now, if we are left with a .providers that is just a single key/value pair, then
Expand Down
4 changes: 2 additions & 2 deletions sdk/python/lib/pulumi/runtime/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,8 @@ async def do_register():

if opts.deleted_with and not await settings.monitor_supports_deleted_with():
raise Exception(
"The Pulumi CLI does not support the DeletedWith option. Please update the Pulumi CLI."
)
"The Pulumi CLI does not support the DeletedWith option. Please update the Pulumi CLI."
)

accept_resources = not (
os.getenv("PULUMI_DISABLE_RESOURCE_REFERENCES", "").upper()
Expand Down
1 change: 1 addition & 0 deletions sdk/python/lib/pulumi/runtime/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ async def monitor_supports_resource_references() -> bool:
async def monitor_supports_output_values() -> bool:
return await monitor_supports_feature("outputValues")


async def monitor_supports_deleted_with() -> bool:
return await monitor_supports_feature("deletedWith")

Expand Down

0 comments on commit b4a2f2b

Please sign in to comment.