Skip to content

Commit 52efe2a

Browse files
committed
Addressing to disable too many nested blocks R1702
1 parent 85ef1ed commit 52efe2a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/migrate/azext_migrate/helpers/replication/get/_execute_get.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,29 +226,29 @@ def _print_protected_item_details(item): # pylint: disable=too-many-nested-bloc
226226

227227
# Custom Properties (Machine Details)
228228
custom_props = item.get('customProperties', {})
229-
if custom_props:
229+
if custom_props: # pylint: disable=too-many-nested-blocks,R1702
230230
print("\n[ MACHINE DETAILS ]")
231231
instance_type = custom_props.get('instanceType', 'N/A')
232232
print(f" Instance Type: {instance_type}")
233233

234-
if instance_type != 'N/A':
234+
if instance_type != 'N/A': # pylint: disable=too-many-nested-blocks,R1702
235235
print(f" Source Machine Name: {custom_props.get('sourceMachineName', 'N/A')}")
236236
print(f" Target VM Name: {custom_props.get('targetVmName', 'N/A')}")
237237
print(f" Target Resource Group: {custom_props.get('targetResourceGroupId', 'N/A')}")
238238
print(f" Custom Location Region: {custom_props.get('customLocationRegion', 'N/A')}")
239239

240240
# Fabric specific properties
241241
fabric_specific = custom_props.get('fabricSpecificDetails', {})
242-
if fabric_specific: # pylint: disable=too-many-nested-blocks
242+
if fabric_specific: # pylint: disable=too-many-nested-blocks,R1702
243243
print("\n [ Fabric Specific Details ]")
244244
for key, value in fabric_specific.items():
245245
# Format key name for display
246246
display_key = key.replace('_', ' ').title()
247-
if isinstance(value, dict):
247+
if isinstance(value, dict): # pylint: disable=too-many-nested-blocks,R1702
248248
print(f" {display_key}:")
249249
for sub_key, sub_value in value.items():
250250
print(f" {sub_key}: {sub_value}")
251-
elif isinstance(value, list):
251+
elif isinstance(value, list): # pylint: disable=too-many-nested-blocks,R1702
252252
print(f" {display_key}: {len(value)} item(s)")
253253
else:
254254
print(f" {display_key}: {value}")

0 commit comments

Comments
 (0)