mirror of
https://github.com/pyscript/pyscript.git
synced 2026-04-12 17:00:29 -04:00
Remove 'Implicit Async', Don't Await runtime.run() (#928)
* Revert to runPython instead of await runPythonAsync * "Implicit Coroutines" are no longer permitted in py-script tags * Tests added for the above * xfail test_importmap (See #938)
This commit is contained in:
@@ -150,7 +150,7 @@ export function make_PyRepl(runtime: Runtime) {
|
||||
/** Execute the python code written in the editor, and automatically
|
||||
* display() the last evaluated expression
|
||||
*/
|
||||
async execute(): Promise<void> {
|
||||
execute(): void {
|
||||
const pySrc = this.getPySrc();
|
||||
|
||||
// determine the output element
|
||||
@@ -166,7 +166,7 @@ export function make_PyRepl(runtime: Runtime) {
|
||||
outEl.innerHTML = '';
|
||||
|
||||
// execute the python code
|
||||
const pyResult = await pyExec(runtime, pySrc, outEl);
|
||||
const pyResult = pyExec(runtime, pySrc, outEl);
|
||||
|
||||
// display the value of the last evaluated expression (REPL-style)
|
||||
if (pyResult !== undefined) {
|
||||
|
||||
@@ -12,7 +12,7 @@ export function make_PyScript(runtime: Runtime) {
|
||||
ensureUniqueId(this);
|
||||
const pySrc = await this.getPySrc();
|
||||
this.innerHTML = '';
|
||||
await pyExec(runtime, pySrc, this);
|
||||
pyExec(runtime, pySrc, this);
|
||||
}
|
||||
|
||||
async getPySrc(): Promise<string> {
|
||||
|
||||
Reference in New Issue
Block a user