@@ -160,7 +160,7 @@ def encode_value_in_name(value, name, max_name_len=20):
160160 if len (encoded_name ) > max_name_len :
161161 msg = (f"Data information named '{ name } ' is too long (need to be less"
162162 f" than { max_name_len - (len (str (value )) + 1 )} characters "
163- f "when storing more than one value for a given data information." )
163+ "when storing more than one value for a given data information." )
164164 raise ValueError (msg )
165165 # Fill to the end with zeros
166166 return encoded_name .ljust (max_name_len , '\x00 ' ).encode ('latin1' )
@@ -195,8 +195,8 @@ def decode_value_from_name(encoded_name):
195195 value = int (splits [1 ]) # Decode value.
196196 elif len (splits ) > 2 :
197197 # The remaining bytes are not \x00, raising.
198- msg = (f"Wrong scalar_name or property_name: '{ encoded_name } '."
199- f" Unused characters should be \\ x00." )
198+ msg = (f"Wrong scalar_name or property_name: '{ encoded_name } '. "
199+ " Unused characters should be \\ x00." )
200200 raise HeaderError (msg )
201201
202202 return name , value
@@ -473,8 +473,8 @@ def save(self, fileobj):
473473 data_for_streamline = first_item .data_for_streamline
474474 if len (data_for_streamline ) > MAX_NB_NAMED_PROPERTIES_PER_STREAMLINE :
475475 msg = (f"Can only store { MAX_NB_NAMED_SCALARS_PER_POINT } named "
476- f "data_per_streamline (also known as 'properties' in the "
477- f "TRK format)." )
476+ "data_per_streamline (also known as 'properties' in the "
477+ "TRK format)." )
478478 raise ValueError (msg )
479479
480480 data_for_streamline_keys = sorted (data_for_streamline .keys ())
@@ -491,8 +491,8 @@ def save(self, fileobj):
491491 data_for_points = first_item .data_for_points
492492 if len (data_for_points ) > MAX_NB_NAMED_SCALARS_PER_POINT :
493493 msg = (f"Can only store { MAX_NB_NAMED_SCALARS_PER_POINT } "
494- f "named data_per_point (also known as 'scalars' in "
495- f "the TRK format)." )
494+ "named data_per_point (also known as 'scalars' in "
495+ "the TRK format)." )
496496 raise ValueError (msg )
497497
498498 data_for_points_keys = sorted (data_for_points .keys ())
@@ -615,8 +615,8 @@ def _read_header(fileobj):
615615 # able to determine the axis directions.
616616 axcodes = aff2axcodes (header [Field .VOXEL_TO_RASMM ])
617617 if None in axcodes :
618- msg = (f "The 'vox_to_ras' affine is invalid! Could not"
619- f " determine the axis directions from it.\n "
618+ msg = ("The 'vox_to_ras' affine is invalid! Could not"
619+ " determine the axis directions from it.\n "
620620 f"{ header [Field .VOXEL_TO_RASMM ]} " )
621621 raise HeaderError (msg )
622622
0 commit comments