@@ -543,8 +543,8 @@ def add_suffix_to_data(
543
543
add_suffix_to_data (data_both , paths_added , moved_to_ind , "+" , "moved to" , "added" )
544
544
545
545
# Check tree attribute difference
546
- path_changes_list_of_dict : List [Dict [str , Dict [str , Any ]]] = []
547
- path_changes_deque : Deque [str ] = deque ([])
546
+ path_to_attrs_diff : List [Dict [str , Dict [str , Any ]]] = []
547
+ paths_with_attr_diff : Deque [str ] = deque ([])
548
548
for attr_change in attr_list :
549
549
condition_diff = (
550
550
(
@@ -565,27 +565,27 @@ def add_suffix_to_data(
565
565
)
566
566
dict_attr_diff = [{attr_change : v } for v in tuple_diff ]
567
567
dict_path_diff = dict (list (zip (data_diff [path_col ], dict_attr_diff )))
568
- path_changes_list_of_dict .append (dict_path_diff )
569
- path_changes_deque .extend (list (data_diff [path_col ]))
568
+ path_to_attrs_diff .append (dict_path_diff )
569
+ paths_with_attr_diff .extend (list (data_diff [path_col ]))
570
570
571
571
if only_diff :
572
572
data_both = data_both [
573
573
(data_both [indicator_col ] != "both" )
574
- | (data_both [path_col ].isin (path_changes_deque ))
574
+ | (data_both [path_col ].isin (paths_with_attr_diff ))
575
575
]
576
576
data_both = data_both [[path_col ]].sort_values (path_col )
577
577
if len (data_both ):
578
578
tree_diff = construct .dataframe_to_tree (
579
579
data_both , node_type = tree .__class__ , sep = tree .sep
580
580
)
581
581
# Handle tree attribute difference
582
- if len (path_changes_deque ):
583
- path_changes_list = sorted (path_changes_deque , reverse = True )
582
+ if len (paths_with_attr_diff ):
583
+ path_changes_list = sorted (paths_with_attr_diff , reverse = True )
584
584
name_changes_list = [
585
585
{k : {"name" : f"{ k .split (tree .sep )[- 1 ]} (~)" } for k in path_changes_list }
586
586
]
587
- path_changes_list_of_dict .extend (name_changes_list )
588
- for attr_change_dict in path_changes_list_of_dict :
587
+ path_to_attrs_diff .extend (name_changes_list )
588
+ for attr_change_dict in path_to_attrs_diff :
589
589
tree_diff = construct .add_dict_to_tree_by_path (
590
590
tree_diff , attr_change_dict
591
591
)
0 commit comments