@@ -55,15 +55,15 @@ def test_array_scalar_like_equivalence(data, all_arithmetic_operators):
5555 scalar_array = pd .array ([scalar ] * len (data ), dtype = data .dtype )
5656
5757 # TODO also add len-1 array (np.array([scalar], dtype=data.dtype.numpy_dtype))
58- for scalar in [scalar , data .dtype .type (scalar )]:
58+ for val in [scalar , data .dtype .type (scalar )]:
5959 if is_bool_not_implemented (data , all_arithmetic_operators ):
6060 msg = "operator '.*' not implemented for bool dtypes"
6161 with pytest .raises (NotImplementedError , match = msg ):
62- op (data , scalar )
62+ op (data , val )
6363 with pytest .raises (NotImplementedError , match = msg ):
6464 op (data , scalar_array )
6565 else :
66- result = op (data , scalar )
66+ result = op (data , val )
6767 expected = op (data , scalar_array )
6868 tm .assert_extension_array_equal (result , expected )
6969
@@ -214,13 +214,13 @@ def test_error_len_mismatch(data, all_arithmetic_operators):
214214 msg = "operator '.*' not implemented for bool dtypes"
215215 err = NotImplementedError
216216
217- for other in [other , np .array (other )]:
217+ for val in [other , np .array (other )]:
218218 with pytest .raises (err , match = msg ):
219- op (data , other )
219+ op (data , val )
220220
221221 s = pd .Series (data )
222222 with pytest .raises (err , match = msg ):
223- op (s , other )
223+ op (s , val )
224224
225225
226226@pytest .mark .parametrize ("op" , ["__neg__" , "__abs__" , "__invert__" ])
0 commit comments