Skip to content

Commit b19e276

Browse files
author
Hood Chatham
authored
MAINT Fix a few lgtm lints (pyodide#1602)
1 parent 9621409 commit b19e276

File tree

6 files changed

+4
-11
lines changed

6 files changed

+4
-11
lines changed

‎packages/matplotlib/src/wasm_backend.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,6 @@ def onmousedown(self, event):
274274
self.button_press_event(x, y, button, guiEvent=event)
275275

276276
def onmouseenter(self, event):
277-
return
278277
# When the mouse is over the figure, get keyboard focus
279278
self.get_element("rubberband").focus()
280279
self.enter_notify_event(guiEvent=event)

‎src/core/pyproxy.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ Module.PyProxyBufferMethods = {
970970
"Javascript has no native support for big endian buffers. " +
971971
"In this case, you can pass an explicit type argument. " +
972972
"For instance, `getBuffer('dataview')` will return a `DataView`" +
973-
"which has native support for reading big endian data." +
973+
"which has native support for reading big endian data. " +
974974
"Alternatively, toJs will automatically convert the buffer " +
975975
"to little endian."
976976
);

‎src/core/python2js_buffer.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ JS_FILE(python2js_buffer_init, () => {
149149
let byteLength = itemsize * n;
150150
// Make new memory of the appropriate size
151151
let buffer = new Uint8Array(byteLength);
152-
for (i = 0; i < n; ++i) {
152+
for (let i = 0; i < n; ++i) {
153153
let curptr = ptr + i * stride;
154154
if (suboffset >= 0) {
155155
curptr = HEAP32[curptr / 4] + suboffset;

‎src/js/pyodide.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def temp(Module):
233233
// TODO: Should we have this?
234234
Module.globals = Module.wrapNamespace(Module.globals);
235235

236-
fixRecursionLimit(Module);
236+
fixRecursionLimit();
237237
let pyodide = makePublicAPI();
238238
pyodide.globals = Module.globals;
239239
pyodide.pyodide_py = Module.pyodide_py;

‎src/py/pyodide/webloop.py‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,6 @@ def default_exception_handler(self, context):
282282
if not message:
283283
message = "Unhandled exception in event loop"
284284

285-
exception = context.get("exception")
286-
if exception is not None:
287-
exc_info = (type(exception), exception, exception.__traceback__)
288-
else:
289-
exc_info = False
290-
291285
if (
292286
"source_traceback" not in context
293287
and self._current_handle is not None

‎src/templates/console.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
pyconsole.stdout_callback = s => term.echo(s, {newline : false});
9494
pyconsole.stderr_callback = s => {
9595
term.error(s.trimEnd());
96-
}
96+
};
9797
term.ready = Promise.resolve();
9898
pyodide._module.on_fatal = async (e) => {
9999
term.error("Pyodide has suffered a fatal error. Please report this to the Pyodide maintainers.");

0 commit comments

Comments
 (0)