@@ -237,7 +237,7 @@ def animation_info(value, loop_bit=8, max_frame=253):
237237 raise generic .ScriptError ("First field of the animation_info array must be either 0 or 1" , value .values [0 ].pos )
238238 if frames < 1 or frames > max_frame :
239239 raise generic .ScriptError (
240- "Second field of the animation_info array must be between 1 and " + str (max_frame ), value .values [1 ].pos
240+ f "Second field of the animation_info array must be between 1 and { str (max_frame )} " , value .values [1 ].pos
241241 )
242242
243243 return ConstantNumeric ((looping << loop_bit ) + frames - 1 )
@@ -1526,7 +1526,7 @@ def get_size(self):
15261526
15271527def label_list (value , prop_num , description ):
15281528 if not isinstance (value , Array ):
1529- raise generic .ScriptError (description + " list must be an array of literal strings" , value .pos )
1529+ raise generic .ScriptError (f" { description } list must be an array of literal strings" , value .pos )
15301530 return [LabelListProp (prop_num , value .values )]
15311531
15321532
@@ -1642,7 +1642,7 @@ def write(self, file):
16421642 for item in self .items :
16431643 val = item .reduce_constant ().value
16441644 if val > 0xFF or val < 0 :
1645- raise generic .ScriptError (self .description + " items must be bytes" , self .pos )
1645+ raise generic .ScriptError (f" { self .description } items must be bytes" , self .pos )
16461646 file .print_byte (val )
16471647 file .newline ()
16481648
@@ -1652,7 +1652,7 @@ def get_size(self):
16521652
16531653def byte_sequence_list (value , prop_num , description , expected_count ):
16541654 if not isinstance (value , Array ) or len (value .values ) != expected_count :
1655- raise generic .ScriptError (description + " must be an array of " + str (expected_count ) + " bytes" , value .pos )
1655+ raise generic .ScriptError (f" { description } must be an array of { str (expected_count )} bytes" , value .pos )
16561656 return [ByteSequenceProp (prop_num , value .values , description , value .pos )]
16571657
16581658
0 commit comments