Skip to content

Commit efcff1b

Browse files
committed
Fixing pylint things I missed earlier
1 parent 7e291b2 commit efcff1b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

examples/webgl_demo/server.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,13 @@
2828
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2929
# THE SOFTWARE.
3030
import json
31-
import logging
3231
import threading
3332
import time
3433

35-
from flask import *
36-
3734
import board
3835
import busio
36+
import flask
37+
3938
import adafruit_bno055
4039

4140
i2c = busio.I2C(board.SCL, board.SDA)
@@ -65,7 +64,7 @@
6564

6665

6766
# Create flask application.
68-
app = Flask(__name__)
67+
app = flask.Flask(__name__)
6968

7069
# Global state to keep track of the latest readings from the BNO055 sensor.
7170
# This will be accessed from multiple threads so care needs to be taken to
@@ -144,7 +143,7 @@ def start_bno_thread():
144143
# this is the only spot to put code that can only run once after starting.
145144
# See this SO question for more context:
146145
# http://stackoverflow.com/questions/24617795/starting-thread-while-running-flask-with-debug
147-
global bno_thread
146+
global bno_thread # pylint: disable=global-statement
148147
# Kick off BNO055 reading thread.
149148
bno_thread = threading.Thread(target=read_bno)
150149
bno_thread.daemon = True # Don't let the BNO reading thread block exiting.
@@ -155,7 +154,7 @@ def start_bno_thread():
155154
def bno_path():
156155
# Return SSE response and call bno_sse function to stream sensor data to
157156
# the webpage.
158-
return Response(bno_sse(), mimetype="text/event-stream")
157+
return flask.Response(bno_sse(), mimetype="text/event-stream")
159158

160159

161160
@app.route("/save_calibration", methods=["POST"])
@@ -178,7 +177,7 @@ def load_calibration():
178177

179178
@app.route("/")
180179
def root():
181-
return render_template("index.html")
180+
return flask.render_template("index.html")
182181

183182

184183
if __name__ == "__main__":

0 commit comments

Comments
 (0)