mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
pyln-client: document and test that init can self-disable.
mypy says it returns None, but it actually doesn't have to! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
12
tests/plugins/selfdisable.py
Executable file
12
tests/plugins/selfdisable.py
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
from pyln.client import Plugin
|
||||
|
||||
plugin = Plugin()
|
||||
|
||||
|
||||
@plugin.init()
|
||||
def init(configuration, options, plugin):
|
||||
return {'disable': 'init saying disable'}
|
||||
|
||||
|
||||
plugin.run()
|
||||
Reference in New Issue
Block a user