Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting Issue in description for external plugins in lightning-cli help #8020

Open
NishantBansal2003 opened this issue Jan 21, 2025 · 0 comments · May be fixed by #8022
Open

Formatting Issue in description for external plugins in lightning-cli help #8020

NishantBansal2003 opened this issue Jan 21, 2025 · 0 comments · May be fixed by #8022
Milestone

Comments

@NishantBansal2003
Copy link

I noticed that the doc variable is not being used anywhere:

doc = inspect.getdoc(method.func)
if not doc:
self.log(
'RPC method \'{}\' does not have a docstring.'.format(
method.name
)
)
doc = "Undocumented RPC method from a plugin."
doc = re.sub('\n+', ' ', doc)
# For compatibility with lightningd prior to 24.08, we must
# provide a description. Ignored by 24.08 onwards,
description = method.description
if description is None:
description = ""
methods.append({
'name': method.name,
'usage': method.get_usage(),
'description': description,
})
.
Additionally, when I use the plugin and run the lightning-cli help command, I get the following output for the funds plugin:

funds [unit] \\nLists the total funds the lightning node owns off- and on-chain in {unit}.\\n{unit} can take the following values:\\ns, satoshi, satoshis to represent satoshis\\nb, bit, bits to represent bits\\nm, milli, btc to represent milliBitcoin\\nB, bitcoin, btc to represent Bitcoins\\nWhen not using Satoshis (default), the values are rounded off.

Originally posted by @NishantBansal2003 in #2216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants