Skip to content

Commit e1b6b8b

Browse files
committed
do not use lambda, e731
1 parent dac84da commit e1b6b8b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/test_large_case.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,11 @@ def large_random(sources_number, targets_number, choices, limit_denominator):
7272
targets = {str(t): 1 for t in range(targets_number)}
7373

7474
wmap_list = []
75-
rnd_weight = lambda: random.uniform(0, 1)
7675
for source in sources:
7776
stargets = set(random.choices(list(targets), k=choices))
7877
for t in stargets:
7978
wmap_list.append({'from': source, 'to': t,
80-
'weight': rnd_weight()})
79+
'weight': random.uniform(0, 1)})
8180
wmap = allocating.WeightedMap(wmap_list)
8281

8382
return allocating.Allocator(sources, wmap, targets, limit_denominator)

0 commit comments

Comments
 (0)