diff --git a/micropython/examples/common/lib/tinyweb/server.py b/micropython/examples/common/lib/tinyweb/server.py index c274a072..c61b8b00 100644 --- a/micropython/examples/common/lib/tinyweb/server.py +++ b/micropython/examples/common/lib/tinyweb/server.py @@ -331,7 +331,7 @@ async def restful_resource_handler(req, resp, param=None): gc.collect() await resp.send('0\r\n\r\n') else: - if type(res) == tuple: + if type(res) is tuple: resp.code = res[1] res = res[0] elif res is None: diff --git a/micropython/examples/cosmic_unicorn/light_sensor.py b/micropython/examples/cosmic_unicorn/light_sensor.py index 46c89a0a..2f382825 100644 --- a/micropython/examples/cosmic_unicorn/light_sensor.py +++ b/micropython/examples/cosmic_unicorn/light_sensor.py @@ -36,6 +36,7 @@ MAX_RANGE = 1 # Rate of display change i.e the lower the value the slower the transition TRANSITION_RATE = 1.0 / 72.0 + # perform linear interpolation to map a range of values to discrete def map_range( x, diff --git a/micropython/examples/inky_frame/inkylauncher/lib/tinyweb/server.py b/micropython/examples/inky_frame/inkylauncher/lib/tinyweb/server.py index c274a072..c61b8b00 100644 --- a/micropython/examples/inky_frame/inkylauncher/lib/tinyweb/server.py +++ b/micropython/examples/inky_frame/inkylauncher/lib/tinyweb/server.py @@ -331,7 +331,7 @@ async def restful_resource_handler(req, resp, param=None): gc.collect() await resp.send('0\r\n\r\n') else: - if type(res) == tuple: + if type(res) is tuple: resp.code = res[1] res = res[0] elif res is None: