Skip to content

Commit 956cddb

Browse files
Replace doclinter with sphinx-lint (#10389)
Co-authored-by: Adam Turner <[email protected]>
1 parent 2a88d80 commit 956cddb

File tree

14 files changed

+24
-101
lines changed

14 files changed

+24
-101
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v2
1515
- name: Set up Python
16-
uses: actions/setup-python@v1
16+
uses: actions/setup-python@v4
1717
with:
18-
python-version: 3.6
18+
python-version: '>=3.7'
1919
- name: Install dependencies
2020
run: pip install -U tox
2121
- name: Run Tox

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ type-check:
6262

6363
.PHONY: doclinter
6464
doclinter:
65-
python utils/doclinter.py CHANGES *.rst doc/
65+
sphinx-lint --enable line-too-long --max-line-length 85 CHANGES *.rst doc/
6666

6767
.PHONY: test
6868
test:

doc/development/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
Extending Sphinx
33
================
44

5-
This guide is aimed at giving a quick introduction for those wishing to
6-
develop their own extensions for Sphinx. Sphinx possesses significant
5+
This guide is aimed at giving a quick introduction for those wishing to
6+
develop their own extensions for Sphinx. Sphinx possesses significant
77
extensibility capabilities including the ability to hook into almost every
8-
point of the build process. If you simply wish to use Sphinx with existing
8+
point of the build process. If you simply wish to use Sphinx with existing
99
extensions, refer to :doc:`/usage/index`. For a more detailed discussion of
1010
the extension interface see :doc:`/extdev/index`.
1111

doc/development/tutorials/autodoc_ext.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ For example, you have the following ``IntEnum``:
123123

124124
.. code-block:: python
125125
:caption: my_enums.py
126-
126+
127127
class Colors(IntEnum):
128128
"""Colors enumerator"""
129129
NONE = 0
@@ -138,5 +138,3 @@ This will be the documentation file with auto-documentation directive:
138138
:caption: index.rst
139139

140140
.. autointenum:: my_enums.Colors
141-
142-

doc/extdev/deprecated.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ The following is a list of deprecated interfaces.
824824
- ``sphinx.domains.std.StandardDomain.process_doc()``
825825

826826
* - ``sphinx.domains.js.JSObject.display_prefix``
827-
-
827+
-
828828
- 4.3
829829
- ``sphinx.domains.js.JSObject.get_display_prefix()``
830830

doc/latex.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ Keys that don't need to be overridden unless in special cases are:
330330

331331
.. attention::
332332

333-
- Do not use this key for a :confval:`latex_engine` other than
333+
- Do not use this key for a :confval:`latex_engine` other than
334334
``'pdflatex'``.
335335

336336
- If Greek is main language, do not use this key. Since Sphinx 2.2.1,
@@ -528,7 +528,7 @@ Keys that don't need to be overridden unless in special cases are:
528528
is adapted to the relative widths of the FreeFont family.
529529

530530
.. versionchanged:: 4.0.0
531-
Changed default for ``'pdflatex'``. Previously it was using
531+
Changed default for ``'pdflatex'``. Previously it was using
532532
``'\\fvset{fontsize=\\small}'``.
533533

534534
.. versionchanged:: 4.1.0
@@ -915,7 +915,7 @@ Do not use quotes to enclose values, whether numerical or strings.
915915
``attentionBorderColor``, ``dangerBorderColor``,
916916
``errorBorderColor``
917917

918-
.. |wgbdcolorslatex| replace:: ``warningBorderColor``, and
918+
.. |wgbdcolorslatex| replace:: ``warningBorderColor``, and
919919
``(caution|attention|danger|error)BorderColor``
920920

921921
.. else latex goes into right margin, as it does not hyphenate the names

doc/templating.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ in the future.
377377
.. data:: sphinx_version_tuple
378378

379379
The version of Sphinx used to build represented as a tuple of five elements.
380-
For Sphinx version 3.5.1 beta 3 this would be `(3, 5, 1, 'beta', 3)``.
380+
For Sphinx version 3.5.1 beta 3 this would be ``(3, 5, 1, 'beta', 3)``.
381381
The fourth element can be one of: ``alpha``, ``beta``, ``rc``, ``final``.
382382
``final`` always has 0 as the last element.
383383

doc/tutorial/describing-code.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,11 @@ you can use :rst:role:`py:func` for that, as follows:
8585
or ``"veggies"``. Otherwise, :py:func:`lumache.get_random_ingredients`
8686
will raise an exception.
8787

88-
When generating code documentation, Sphinx will generate a cross-reference automatically just
89-
by using the name of the object, without you having to explicitly use a role
90-
for that. For example, you can describe the custom exception raised by the
91-
function using the :rst:dir:`py:exception` directive:
88+
When generating code documentation, Sphinx will generate a
89+
cross-reference automatically just by using the name of the object,
90+
without you having to explicitly use a role for that. For example, you
91+
can describe the custom exception raised by the function using the
92+
:rst:dir:`py:exception` directive:
9293

9394
.. code-block:: rst
9495
:caption: docs/source/usage.rst

doc/usage/extensions/intersphinx.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ The Intersphinx extension provides the following role.
209209

210210
If you would like to constrain the lookup to a specific external project,
211211
then the key of the project, as specified in :confval:`intersphinx_mapping`,
212-
is added as well to get the two forms
212+
is added as well to get the two forms
213213

214214
- ``:external+invname:domain:reftype:`target```,
215215
e.g., ``:external+python:py:class:`zipfile.ZipFile```, or

doc/usage/extensions/napoleon.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ Google style with Python 3 type annotations::
221221

222222
"""
223223
return True
224-
224+
225225
class Class:
226226
"""Summary line.
227227

@@ -251,7 +251,7 @@ Google style with types in docstrings::
251251

252252
"""
253253
return True
254-
254+
255255
class Class:
256256
"""Summary line.
257257

0 commit comments

Comments
 (0)