Skip to content

Commit

Permalink
Add nosec marker for Codacy issues with randoms
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno P. Kinoshita committed Mar 25, 2019
1 parent 350f191 commit 73d50d9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/cylc/xtriggers/xrandom.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@ def xrandom(percent, secs=0, _=None, debug=False):
"""
sleep(float(secs))
results = {}
satisfied = int(percent) != 0 and (1 == randint(1, 100 / int(percent)))
satisfied = int(percent) != 0 and \
(1 == randint(1, 100 / int(percent))) # nosec
if satisfied:
results = {
'COLOR': COLORS[randint(0, len(COLORS) - 1)],
'SIZE': SIZES[randint(0, len(SIZES) - 1)]
'COLOR': COLORS[randint(0, len(COLORS) - 1)], # nosec
'SIZE': SIZES[randint(0, len(SIZES) - 1)] # nosec
}
return (satisfied, results)

0 comments on commit 73d50d9

Please sign in to comment.