mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 14:21:53 +00:00

## Summary Resolves #15522. ## Test Plan `cargo nextest run` and `cargo insta test`. --------- Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
27 lines
374 B
Python
27 lines
374 B
Python
import os
|
|
import random
|
|
|
|
import a_lib
|
|
|
|
# OK
|
|
random.SystemRandom()
|
|
|
|
# Errors
|
|
random.Random()
|
|
random.random()
|
|
random.randrange()
|
|
random.randint()
|
|
random.choice()
|
|
random.choices()
|
|
random.uniform()
|
|
random.triangular()
|
|
random.randbytes()
|
|
|
|
# Unrelated
|
|
os.urandom()
|
|
a_lib.random()
|
|
|
|
|
|
# https://github.com/astral-sh/ruff/issues/15522
|
|
map(random.randrange, [])
|
|
foo = random.randrange
|