You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I noticed that random.choice raises a B311 warning here. I assume this is to try to stop someone from using it with a range() in security-related code. I noticed some other random functions that could be used in a similar way but are not currently checked: sample, randrange and getrandbits.
Describe the solution you'd like
Add random.sample, random.randrange, and random.getrandbits to B311 check
Describe alternatives you've considered
None
Additional context
N/A
Love this idea? Give it a 👍. We prioritize fulfilling features with the most 👍.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I noticed that
random.choice
raises a B311 warning here. I assume this is to try to stop someone from using it with arange()
in security-related code. I noticed some otherrandom
functions that could be used in a similar way but are not currently checked:sample
,randrange
andgetrandbits
.Describe the solution you'd like
Add
random.sample
,random.randrange
, andrandom.getrandbits
to B311 checkDescribe alternatives you've considered
None
Additional context
N/A
Love this idea? Give it a 👍. We prioritize fulfilling features with the most 👍.
The text was updated successfully, but these errors were encountered: