@@ -192,7 +192,7 @@ def test_minimise_array_shapes(min_dims, dim_range, min_side, side_range):
192
192
193
193
194
194
@pytest .mark .parametrize (
195
- "kwargs" , [dict ( min_side = 100 ), dict ( min_dims = 15 ), dict ( min_dims = 32 ) ]
195
+ "kwargs" , [{ " min_side" : 100 }, { " min_dims" : 15 }, { " min_dims" : 32 } ]
196
196
)
197
197
def test_interesting_array_shapes_argument (kwargs ):
198
198
nps .array_shapes (** kwargs ).example ()
@@ -453,9 +453,9 @@ def test_all_inferred_scalar_strategies_roundtrip(data, dtype):
453
453
@checks_deprecated_behaviour
454
454
@given (st .data ())
455
455
def test_overflowing_integers_are_deprecated (fill , data ):
456
- kw = dict ( elements = st .just (300 ))
456
+ kw = { " elements" : st .just (300 )}
457
457
if fill :
458
- kw = dict ( elements = st .nothing (), fill = kw ["elements" ])
458
+ kw = { " elements" : st .nothing (), " fill" : kw ["elements" ]}
459
459
arr = data .draw (nps .arrays (dtype = "int8" , shape = (1 ,), ** kw ))
460
460
assert arr [0 ] == (300 % 256 )
461
461
@@ -475,9 +475,9 @@ def test_overflowing_integers_are_deprecated(fill, data):
475
475
@given (data = st .data ())
476
476
def test_unrepresentable_elements_are_deprecated (fill , dtype , strat , data ):
477
477
if fill :
478
- kw = dict ( elements = st .nothing (), fill = strat )
478
+ kw = { " elements" : st .nothing (), " fill" : strat }
479
479
else :
480
- kw = dict ( elements = strat )
480
+ kw = { " elements" : strat }
481
481
arr = data .draw (nps .arrays (dtype = dtype , shape = (1 ,), ** kw ))
482
482
try :
483
483
# This is a float or complex number, and has overflowed to infinity,
@@ -992,7 +992,7 @@ def test_mutually_broadcastable_shapes_only_singleton_is_valid(
992
992
assert len (input_shapes ) == num_shapes
993
993
assert result == _broadcast_shapes (base_shape , * input_shapes )
994
994
for shape in input_shapes :
995
- assert all ([ i == 1 for i in shape [- len (base_shape ) :] ])
995
+ assert all (i == 1 for i in shape [- len (base_shape ) :])
996
996
997
997
998
998
@settings (deadline = None )
@@ -1007,11 +1007,10 @@ def test_broadcastable_shape_can_generate_arbitrary_ndims(shape, max_dims, data)
1007
1007
min_dims = data .draw (
1008
1008
st .one_of (st .none (), st .integers (0 , desired_ndim )), label = "min_dims"
1009
1009
)
1010
- args = (
1011
- dict (min_dims = min_dims ) if min_dims is not None else {}
1012
- ) # check default arg behavior too
1010
+ # check default arg behavior too
1011
+ kwargs = {"min_dims" : min_dims } if min_dims is not None else {}
1013
1012
find_any (
1014
- nps .broadcastable_shapes (shape , min_side = 0 , max_dims = max_dims , ** args ),
1013
+ nps .broadcastable_shapes (shape , min_side = 0 , max_dims = max_dims , ** kwargs ),
1015
1014
lambda x : len (x ) == desired_ndim ,
1016
1015
settings (max_examples = 10 ** 6 ),
1017
1016
)
@@ -1035,16 +1034,15 @@ def test_mutually_broadcastable_shapes_can_generate_arbitrary_ndims(
1035
1034
min_dims = data .draw (
1036
1035
st .one_of (st .none (), st .integers (0 , min (desired_ndims ))), label = "min_dims"
1037
1036
)
1038
- args = (
1039
- dict (min_dims = min_dims ) if min_dims is not None else {}
1040
- ) # check default arg behavior too
1037
+ # check default arg behavior too
1038
+ kwargs = {"min_dims" : min_dims } if min_dims is not None else {}
1041
1039
find_any (
1042
1040
nps .mutually_broadcastable_shapes (
1043
1041
num_shapes = num_shapes ,
1044
1042
base_shape = base_shape ,
1045
1043
min_side = 0 ,
1046
1044
max_dims = max_dims ,
1047
- ** args
1045
+ ** kwargs
1048
1046
),
1049
1047
lambda x : {len (s ) for s in x .input_shapes } == set (desired_ndims ),
1050
1048
settings (max_examples = 10 ** 6 ),
0 commit comments