titibs29 / API_LED_PY

Test for membership should be 'not in' FLK-E713
Anti-pattern
Major
1 occurrence in this check
test for membership should be 'not in'
14def set(pin, state):
15    if pin not in pins:
16        abort(code=404, text="pin useless")
17    if not state in (1, 0):18        abort(code=400, text='invalid state '+str(state))
19
20    gpio.output(pin, state)