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

D400 rule ("ends-in-period") adds dot at the end of RST headings which break sphinx builds #8925

Closed
AKuederle opened this issue Nov 30, 2023 · 1 comment
Assignees
Labels
bug Something isn't working docstring Related to docstring linting or formatting

Comments

@AKuederle
Copy link

When using sphinx-gallery you regularly write example files that need to start with a RST-style heading in the module docstring.

"""
My example
==========

My example explanation
"""
print("my_example")

The autofix rule for D400 adds a dot at the end of the underline, making it invalid RST and breaking the Sphinx build

After transformation:

"""
My example
==========.

My example explanation
"""
print("my_example")

Tested in latest ruff version (0.1.6)

@charliermarsh charliermarsh self-assigned this Nov 30, 2023
@charliermarsh charliermarsh added bug Something isn't working docstring Related to docstring linting or formatting labels Nov 30, 2023
@charliermarsh
Copy link
Member

Closed by #8929 -- thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docstring Related to docstring linting or formatting
Projects
None yet
Development

No branches or pull requests

2 participants