mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-22 11:45:28 -05:00
Change Plugin Hooks to Use options object/kwargs (#1132)
This commit is contained in:
@@ -37,11 +37,11 @@ class TestLogger(Plugin):
|
||||
def afterStartup(self, config):
|
||||
console.log('afterStartup called')
|
||||
|
||||
def beforePyScriptExec(self, interpreter, src, pyscript_tag):
|
||||
def beforePyScriptExec(self, interpreter, src, pyScriptTag):
|
||||
console.log(f'beforePyScriptExec called')
|
||||
console.log(f'before_src:{src}')
|
||||
|
||||
def afterPyScriptExec(self, interpreter, src, pyscript_tag, result):
|
||||
def afterPyScriptExec(self, interpreter, src, pyScriptTag, result):
|
||||
console.log(f'afterPyScriptExec called')
|
||||
console.log(f'after_src:{src}')
|
||||
|
||||
@@ -60,15 +60,15 @@ from js import console
|
||||
|
||||
class ExecTestLogger(Plugin):
|
||||
|
||||
def beforePyScriptExec(self, interpreter, src, pyscript_tag):
|
||||
def beforePyScriptExec(self, interpreter, src, pyScriptTag):
|
||||
console.log(f'beforePyScriptExec called')
|
||||
console.log(f'before_src:{src}')
|
||||
console.log(f'before_id:{pyscript_tag.id}')
|
||||
console.log(f'before_id:{pyScriptTag.id}')
|
||||
|
||||
def afterPyScriptExec(self, interpreter, src, pyscript_tag, result):
|
||||
def afterPyScriptExec(self, interpreter, src, pyScriptTag, result):
|
||||
console.log(f'afterPyScriptExec called')
|
||||
console.log(f'after_src:{src}')
|
||||
console.log(f'after_id:{pyscript_tag.id}')
|
||||
console.log(f'after_id:{pyScriptTag.id}')
|
||||
console.log(f'result:{result}')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user