Skip to content

ENH: Allow a trailing COMMA or PERIOD in a See Also function list block #207

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

Merged
merged 1 commit into from
Apr 17, 2019

Conversation

pvanmulbregt
Copy link
Contributor

Addresses #206.

Only trigger the trailing comma warning if there is also a description on the same line.
Added a test that the warning is generated.

It supports the following formats.

 <FUNCNAME>
 <FUNCNAME> SPACE* COLON SPACE+ <DESC> SPACE*
 <FUNCNAME> ( COMMA SPACE+ <FUNCNAME>)+ (COMMA | PERIOD)? SPACE*
 <FUNCNAME> ( COMMA SPACE+ <FUNCNAME>)* SPACE* COLON SPACE+ <DESC> SPACE*

Observing a COMMA or PERIOD followed by a (as in the following) is accepted but triggers a warning:

 <FUNCNAME> ( COMMA SPACE+ <FUNCNAME>)* (COMMA | PERIOD)? SPACE* COLON SPACE+ <DESC> SPACE*

Does this cover all the currently desired use cases?

Only trigger the trailing comma warning if there is also a description on the
same line.
Added a test that the warning is generated.
@rgommers rgommers merged commit 54e3cb0 into numpy:master Apr 17, 2019
@rgommers
Copy link
Member

Great, thanks @pvanmulbregt!

Looks good, and I have tested on NumPy and SciPy docs - all works as expected.

@rgommers rgommers added this to the v0.9.0 milestone Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants