@@ -493,7 +493,9 @@ def fix_key(self, key: tuple) -> tuple:
493
493
else :
494
494
# try first by searching for alternative units
495
495
if key [4 ] in self .outdated_units :
496
- print (f"found alternative unit: { key [4 ]} . Changing to { self .outdated_units [key [4 ]]} " )
496
+ print (
497
+ f"found alternative unit: { key [4 ]} . Changing to { self .outdated_units [key [4 ]]} "
498
+ )
497
499
if (
498
500
key [0 ],
499
501
key [1 ],
@@ -502,14 +504,16 @@ def fix_key(self, key: tuple) -> tuple:
502
504
self .outdated_units [key [4 ]],
503
505
key [5 ],
504
506
) in self .dependency_mapping :
505
- return self .dependency_mapping [(
506
- key [0 ],
507
- key [1 ],
508
- key [2 ],
509
- key [3 ],
510
- self .outdated_units [key [4 ]],
511
- key [5 ],
512
- )]
507
+ return self .dependency_mapping [
508
+ (
509
+ key [0 ],
510
+ key [1 ],
511
+ key [2 ],
512
+ key [3 ],
513
+ self .outdated_units [key [4 ]],
514
+ key [5 ],
515
+ )
516
+ ]
513
517
514
518
correct_id = self .find_correct_id (key )
515
519
if correct_id is None :
@@ -1064,9 +1068,7 @@ def format_superstructure_dataframe(self) -> None:
1064
1068
"production" ,
1065
1069
)
1066
1070
if consumer_key in self .reversed_acts_indices :
1067
- consumer_idx = self .reversed_acts_indices [
1068
- consumer_key
1069
- ]
1071
+ consumer_idx = self .reversed_acts_indices [consumer_key ]
1070
1072
else :
1071
1073
consumer_key = (
1072
1074
c_name ,
@@ -1078,9 +1080,7 @@ def format_superstructure_dataframe(self) -> None:
1078
1080
)
1079
1081
1080
1082
if consumer_key in self .reversed_acts_indices :
1081
- consumer_idx = self .reversed_acts_indices [
1082
- consumer_key
1083
- ]
1083
+ consumer_idx = self .reversed_acts_indices [consumer_key ]
1084
1084
else :
1085
1085
print ("not found key for consumer " , consumer_key )
1086
1086
consumer_idx = 0
@@ -1112,7 +1112,6 @@ def format_superstructure_dataframe(self) -> None:
1112
1112
s_type ,
1113
1113
)
1114
1114
except TypeError :
1115
-
1116
1115
supplier_key = (
1117
1116
s_name ,
1118
1117
s_prod ,
0 commit comments