Skip to content

Set max doc length to 75 for python/dolfinx/ and python/demo/ #3706

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

schnellerhase
Copy link
Contributor

Sphinx requires max line length of 79 see https://documentation-style-guide-sphinx.readthedocs.io/en/latest/style-guide.html#line-length. Dolfinx seems to be already mostly formatted with max-doc-length = 75 - this is however not checked with ruff and causes reformatting issues when the doc strings are changed over time.

Proposes to enable a ruff check for the specified doc string line length for the documentation relevant Python directories.

@schnellerhase schnellerhase marked this pull request as ready for review April 13, 2025 13:46
@@ -0,0 +1,5 @@
[tool.ruff]
extend = "../pyproject.toml"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this line do?

Copy link
Contributor Author

@schnellerhase schnellerhase Apr 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tells ruff to pick up the config file given by the relative path and extend it with the definitions in this file. Therefore the doc line formatting does not get applied to for example python/test

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

Successfully merging this pull request may close these issues.

2 participants