@@ -755,9 +755,8 @@ def logical_method(self, other):
755
755
756
756
if other_is_scalar and not (other is libmissing .NA or lib .is_bool (other )):
757
757
raise TypeError (
758
- "'other' should be pandas.NA or a bool. Got {} instead." .format (
759
- type (other ).__name__
760
- )
758
+ "'other' should be pandas.NA or a bool. "
759
+ f"Got { type (other ).__name__ } instead."
761
760
)
762
761
763
762
if not other_is_scalar and len (self ) != len (other ):
@@ -772,7 +771,7 @@ def logical_method(self, other):
772
771
773
772
return BooleanArray (result , mask )
774
773
775
- name = "__{name}__" . format ( name = op .__name__ )
774
+ name = f "__{ op .__name__ } __"
776
775
return set_function_name (logical_method , name , cls )
777
776
778
777
@classmethod
@@ -819,7 +818,7 @@ def cmp_method(self, other):
819
818
820
819
return BooleanArray (result , mask , copy = False )
821
820
822
- name = "__{name}__" . format ( name = op .__name__ )
821
+ name = f "__{ op .__name__ } "
823
822
return set_function_name (cmp_method , name , cls )
824
823
825
824
def _reduce (self , name , skipna = True , ** kwargs ):
@@ -922,7 +921,7 @@ def boolean_arithmetic_method(self, other):
922
921
923
922
return self ._maybe_mask_result (result , mask , other , op_name )
924
923
925
- name = "__{name }__" . format ( name = op_name )
924
+ name = f "__{ op_name } __"
926
925
return set_function_name (boolean_arithmetic_method , name , cls )
927
926
928
927
0 commit comments