Skip to content

Lint rule to catch incorrect sphinx directives #18425

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

Closed
Scorpil opened this issue Nov 22, 2017 · 0 comments · Fixed by #18437
Closed

Lint rule to catch incorrect sphinx directives #18425

Scorpil opened this issue Nov 22, 2017 · 0 comments · Fixed by #18437
Labels
CI Continuous Integration Docs
Milestone

Comments

@Scorpil
Copy link
Contributor

Scorpil commented Nov 22, 2017

Code Sample, a copy-pastable example if possible

None. Documentation / build issue.

Problem description

There are few places where tag "versionadded" misses one semicolon, making it a sphinx comment instead of directive:

pandas/core/frame.py
4516:            .. versionadded: 0.18.0
4679:            .. versionadded: 0.16.1

pandas/core/generic.py
968:            .. versionadded: 0.21.0

pandas/core/series.py
1629:            .. versionadded: 0.19.0
2216:            .. versionadded: 0.18.0

pandas/core/tools/datetimes.py
117:        .. versionadded: 0.18.1
143:        .. versionadded: 0.16.1
181:        .. versionadded: 0.20.0
187:        .. versionadded: 0.22.0

pandas/tseries/offsets.py
778:    .. versionadded: 0.16.1
882:    .. versionadded: 0.18.1

Correct way to use it: .. versionadded:: x.xx.x" (note two semicolons).

Apart from fixing it here and now, it would be useful to have a lint rule that warns contributors about this and similar issues in future (in docstrings and in docs).

Expected Output

Lint rule to catch incorrect sphinx directives.

Output of pd.show_versions()

Doesn't matter.

@jreback jreback added CI Continuous Integration Docs Difficulty Novice labels Nov 22, 2017
@jreback jreback added this to the Next Major Release milestone Nov 22, 2017
@jreback jreback modified the milestones: Next Major Release, 0.22.0 Nov 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants