8000 remove unused import · rmyers/pyscript@a9e1b7c · GitHub
[go: up one dir, main page]

Skip to content

Commit a9e1b7c

Browse files
committed
remove unused import
1 parent f79d76c commit a9e1b7c

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

pyscriptjs/examples/todo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
def add_task(*ags, **kws):
1313
# create task
1414
task_id = f"task-{len(tasks)}"
15-
now = dt.now()
1615
task = {"id": task_id, "content": new_task_content.element.value, "done": False, "created_at": dt.now()}
1716

1817
tasks.append(task)

pyscriptjs/src/interpreter.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,9 @@ let loadFromFile = async function(s: string, runtime: any): Promise<any> {
135135
let filename = getLastPath(s);
136136
await runtime.runPythonAsync(`
137137
from pyodide.http import pyfetch
138-
from pyodide import eval_code
138+
139139
response = await pyfetch("`+s+`")
140140
content = await response.bytes()
141-
142141
with open("`+filename+`", "wb") as f:
143142
f.write(content)
144143
`)

pyscriptjs/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ const getLastPath = function (str) {
99
return str.split('\\').pop().split('/').pop();
1010
}
1111

12-
export {addClasses, getLastPath}
12+
export {addClasses, getLastPath}

0 commit comments

Comments
 (0)
0