Skip to content

Commit

Permalink
Added rst checker
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedNasser8 committed Jun 9, 2024
1 parent 18c874e commit 1eef4c2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml

- repo: https://github.com/rstcheck/rstcheck
rev: v6.1.2 # Use the latest version
hooks:
- id: rstcheck
args: ["--ignore-directives", "currentmodule,minigallery,autofunction,only,image-sg,rst-class,toctree,autosummary", "--ignore-roles", "ref"]
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ sphinxcontrib-qthelp
sphinxcontrib-serializinghtml
#nbsphinx
sphinx-gallery
rstcheck[sphinx]
4 changes: 4 additions & 0 deletions docs/source/_templates/autosummary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

{% if objtype in ['class'] %}
.. auto{{ objtype }}:: {{ objname }}
:show-inheritance:
:special-members: __call__
Expand All @@ -16,11 +17,14 @@

{% if objtype in ['class', 'method', 'function'] %}
{% if objname in ['AxesGrid', 'Scalable', 'HostAxes', 'FloatingAxes',

'ParasiteAxesAuxTrans', 'ParasiteAxes'] %}

.. Filter out the above aliases to other classes, as sphinx gallery
creates no example file for those (sphinx-gallery/sphinx-gallery#365)
{% else %}

.. minigallery:: {{module}}.{{objname}}
:add-heading:

Expand Down

0 comments on commit 1eef4c2

Please sign in to comment.