@@ -32,13 +32,19 @@ def generate_build_data(balance_data_path):
3232 command_index = int (command_index_str )
3333
3434 # Pad potential gaps in command indices with empty strings
35- while len (ability_lookup [ability_name ]) <= command_index :
35+ while (
36+ len (ability_lookup [ability_name ]) <= command_index
37+ ):
3638 ability_lookup [ability_name ].append ("" )
3739
3840 command_name = (
39- command_id if command_id != "Execute" else ability_name
41+ command_id
42+ if command_id != "Execute"
43+ else ability_name
4044 )
41- ability_lookup [ability_name ][command_index ] = command_name
45+ ability_lookup [ability_name ][
46+ command_index
47+ ] = command_name
4248
4349 unit_id = root .get ("id" )
4450
@@ -74,7 +80,9 @@ def generate_build_data(balance_data_path):
7480 command_index = int (command_index_str )
7581
7682 # Pad potential gaps in command indices with empty strings
77- while len (ability_lookup [build_ability_name ]) <= command_index :
83+ while (
84+ len (ability_lookup [build_ability_name ]) <= command_index
85+ ):
7886 ability_lookup [build_ability_name ].append ("" )
7987
8088 build_command_name = "Build{}" .format (built_unit_id )
@@ -118,7 +126,8 @@ def generate_build_data(balance_data_path):
118126
119127 # Pad potential gaps in command indices with empty strings
120128 while (
121- len (ability_lookup [train_ability_name ]) <= command_index
129+ len (ability_lookup [train_ability_name ])
130+ <= command_index
122131 ):
123132 ability_lookup [train_ability_name ].append ("" )
124133
@@ -133,11 +142,14 @@ def generate_build_data(balance_data_path):
133142
134143 # Pad potential gaps in command indices with empty strings
135144 while (
136- len (ability_lookup [train_ability_name ]) <= command_index
145+ len (ability_lookup [train_ability_name ])
146+ <= command_index
137147 ):
138148 ability_lookup [train_ability_name ].append ("" )
139149
140- train_command_name = "Train{}" .format (trained_unit_name )
150+ train_command_name = "Train{}" .format (
151+ trained_unit_name
152+ )
141153 ability_lookup [train_ability_name ][
142154 command_index
143155 ] = train_command_name
@@ -160,10 +172,15 @@ def generate_build_data(balance_data_path):
160172 command_index = int (command_index_str )
161173
162174 # Pad potential gaps in command indices with empty strings
163- while len (ability_lookup [research_ability_name ]) <= command_index :
175+ while (
176+ len (ability_lookup [research_ability_name ])
177+ <= command_index
178+ ):
164179 ability_lookup [research_ability_name ].append ("" )
165180
166- research_command_name = "Research{}" .format (researched_upgrade_id )
181+ research_command_name = "Research{}" .format (
182+ researched_upgrade_id
183+ )
167184 ability_lookup [research_ability_name ][
168185 command_index
169186 ] = research_command_name
@@ -175,7 +192,9 @@ def generate_build_data(balance_data_path):
175192 sorted (abilities .items (), key = lambda x : int (x [0 ]))
176193 )
177194
178- unit_lookup = dict ((unit_name , unit_name ) for _ , unit_name in sorted_units .items ())
195+ unit_lookup = dict (
196+ (unit_name , unit_name ) for _ , unit_name in sorted_units .items ()
197+ )
179198
180199 return sorted_units , sorted_abilities , unit_lookup , ability_lookup
181200
0 commit comments