titibs29 / API_LED_PY

Missing module/function docstring PY-D0003
Documentation
Minor
7 occurrences in this check
Docstring missing for switch
47
48
49@app.get('/switch/<pin:int>')
50def switch(pin):51    if not pin:
52        abort(code=404, text="pin not provided")
53    if pin not in pins:
Docstring missing for set
11
12
13@app.route('/set/<pin:int>/<state:int>')
14def set(pin, state):15    if pin not in pins:
16        abort(code=404, text="pin useless")
17    if not state in (1, 0):
Docstring missing for allPins
30
31
32@app.get('/pins')
33def allPins():34    return str(pins)
35
36
Docstring missing for get
35
36
37@app.get('/get/<pin:int>')
38def get(pin):39    if pin not in pins:
40        abort(code=404, text="pin useless")
41    return str(states.get(pin))
Docstring missing for getAll
42
43
44@app.get('/get')
45def getAll():46    return states
47
48
Docstring missing for index
58
59
60@app.get('/')
61def index():62    return static_file("index.html", root="static")
63
64
Docstring missing for setAll
22    return "pin "+str(pin)+" changed to "+str(states[pin])
23
24@app.get('/setAll/<state:int>')
25def setAll(state):26    gpio.output(pins, state)
27    for pin in states:
28        states[pin] = state