Change Plugin Hooks to Use options object/kwargs (#1132)

This commit is contained in:
Jeff Glass
2023-01-26 07:20:04 -06:00
committed by GitHub
parent 697ac9de9a
commit 12bf6db331
4 changed files with 37 additions and 37 deletions

View File

@@ -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}')