Skip to content

Commit a625f76

Browse files
committed
📝 Add ruff docstring linter
1 parent fa82d96 commit a625f76

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

docs/document/sphinx/docstrings.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,28 @@ NumPy Style Guide:
141141
"""
142142
return True
143143
144+
.. tip::
145+
You can have your docstring syntax checked using the following :doc:`ruff
146+
<Python4DataScience:productive/qa/ruff>` configuration:
147+
148+
.. code-block:: toml
149+
:caption: pyproject.toml
150+
151+
[tool.ruff]
152+
lint.pydocstyle.convention = "google"
153+
154+
or:
155+
156+
.. code-block:: toml
157+
:caption: pyproject.toml
158+
159+
[tool.ruff]
160+
lint.pydocstyle.convention = "numpy"
161+
162+
.. seealso::
163+
* `lint.pydocstyle.convention
164+
<https://docs.astral.sh/ruff/settings/#lint_pydocstyle_convention>`_
165+
144166
.. note::
145167
We also frequently use the NumPy Style Guide in agent-based software
146168
development:

0 commit comments

Comments
 (0)