style: Fix flake8 complaints
All checks were successful
Build RPi Pico firmware image / Build-Firmware (push) Successful in 4m28s
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 11s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 9s
Run pytests / Check-Pytest (push) Successful in 11s
All checks were successful
Build RPi Pico firmware image / Build-Firmware (push) Successful in 4m28s
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 11s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 9s
Run pytests / Check-Pytest (push) Successful in 11s
Remove unused imports in main.py Add missing "global" in webserver and fix spacing. Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
This commit is contained in:
@@ -9,9 +9,7 @@ import micropython
|
|||||||
import network
|
import network
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
from math import pi, sin, pow
|
|
||||||
import ubinascii
|
import ubinascii
|
||||||
from microdot import Microdot
|
|
||||||
|
|
||||||
# Own modules
|
# Own modules
|
||||||
import app
|
import app
|
||||||
|
|||||||
@@ -10,9 +10,12 @@ from microdot import Microdot
|
|||||||
webapp = Microdot()
|
webapp = Microdot()
|
||||||
server = None
|
server = None
|
||||||
|
|
||||||
|
|
||||||
def start_webserver():
|
def start_webserver():
|
||||||
|
global server
|
||||||
server = asyncio.create_task(webapp.start_server(port=80))
|
server = asyncio.create_task(webapp.start_server(port=80))
|
||||||
|
|
||||||
|
|
||||||
@webapp.route('/')
|
@webapp.route('/')
|
||||||
async def index(request):
|
async def index(request):
|
||||||
print("wohoo, a guest :)")
|
print("wohoo, a guest :)")
|
||||||
|
|||||||
Reference in New Issue
Block a user