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

.help only shows 1 example #1200

Closed
hemna opened this issue Jun 7, 2017 · 4 comments
Closed

.help only shows 1 example #1200

hemna opened this issue Jun 7, 2017 · 4 comments

Comments

@hemna
Copy link

hemna commented Jun 7, 2017

Looking at the code for the calc command, it has declared several examples. When I run ".help calc", I always get one and only one example.

 <hemna> .help calc
 <pewp> hemna: Evaluate some calculation.
 <pewp> hemna: e.g. .c 5 / 2

The calc code is here:
https://github.com/sopel-irc/sopel/blob/master/sopel/modules/calc.py#L22-L29

I'm writing my own module, and I am trying to get all of the examples to show, but it functions the same as the calc example above. No matter how many @example decorators I have on the method, it only shows one.

@dgw dgw added this to the 6.6.0 milestone Apr 3, 2018
@dgw
Copy link
Member

dgw commented Apr 3, 2018

The @example decorator is mostly for auto-generating tests, and the help module just kind of uses it too. I'm putting in a fair amount of work on @example for the next version, and might try to tackle this. (If I don't, @hekel might. 😁)

@dgw
Copy link
Member

dgw commented Apr 3, 2018

Did some work on this in 3fe610c. Not final, subject to change, etc. Most importantly it kind of relies on #1303, so if that gets postponed so will this.

@dgw dgw modified the milestones: 6.6.0, 7.0.0 Nov 6, 2018
@dgw
Copy link
Member

dgw commented Nov 6, 2018

Pushed to Sopel 7, as my WIP solution requires a new argument to @sopel.module.example(), which I do not want to add in a point release.

@dgw dgw self-assigned this Nov 6, 2018
@dgw dgw removed their assignment Apr 20, 2019
@dgw
Copy link
Member

dgw commented Apr 20, 2019

Merged a fix for this that modules will have to opt into. See #1403.

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

No branches or pull requests

2 participants