in
PYL-R1714220 if run.user.id != user_id and not bool(User[user_id].sys_admin):
221 raise HTTPException(status_code=401, detail="Access denied")
222 if (
223 run.status.id == Run_status.RUNNING224 or run.status.id == Run_status.PROVING_OPTIMALITY
225 ):
226 resp = requests.post(
To check if a variable is equal to one of many values, combine the values into a tuple and check if the variable is contained in
it instead of checking for equality against each of the values.
This is faster, less verbose, and more readable.
if x == 1 or x == 2 or x == 3:
do_something()
if x in (1, 2, 3):
do_something()