[3.11] Restore default role check in make check. (GH-92290) (#92821)

* Restore default role check in `make check`.

* Options first, then files.

* Update `make.bat` too.

* Add a comment explaining the extra options.

* No reason to ignore the README.rst.

* Enable default-role check in sphinx-lint.

Co-authored-by: Julien Palard <julien@palard.fr>

* Update sphinx-lint default-role check.

* Fix use of the default role in the docs.

* Update make.bat to check for the default role too.

* Fix comment in make.bat.

Co-authored-by: Julien Palard <julien@palard.fr>
(cherry picked from commit 953ab07952)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
This commit is contained in:
Ezio Melotti 2022-05-15 17:55:12 +02:00 committed by GitHub
parent 2bcae11302
commit 5b2c5ae756
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 6 deletions

View file

@ -213,8 +213,10 @@ dist:
rm dist/python-$(DISTVERSION)-docs-texinfo.tar rm dist/python-$(DISTVERSION)-docs-texinfo.tar
check: check:
$(SPHINXLINT) -i tools -i $(VENVDIR) -i README.rst # Check the docs and NEWS files with sphinx-lint.
$(SPHINXLINT) ../Misc/NEWS.d/next/ # Ignore the tools and venv dirs and check that the default role is not used.
$(SPHINXLINT) -i tools -i $(VENVDIR) --enable default-role
$(SPHINXLINT) --enable default-role ../Misc/NEWS.d/next/
serve: serve:
@echo "The serve target was removed, use htmlview instead (see bpo-36329)" @echo "The serve target was removed, use htmlview instead (see bpo-36329)"

View file

@ -998,7 +998,7 @@ Other constructors, all class methods:
ISO 8601 format, with the following exceptions: ISO 8601 format, with the following exceptions:
1. Time zone offsets may have fractional seconds. 1. Time zone offsets may have fractional seconds.
2. The `T` separator may be replaced by any single unicode character. 2. The ``T`` separator may be replaced by any single unicode character.
3. Ordinal dates are not currently supported. 3. Ordinal dates are not currently supported.
4. Fractional hours and minutes are not supported. 4. Fractional hours and minutes are not supported.

View file

@ -126,11 +126,11 @@ Module Contents
:func:`member` :func:`member`
Make `obj` a member. Can be used as a decorator. Make ``obj`` a member. Can be used as a decorator.
:func:`nonmember` :func:`nonmember`
Do not make `obj` a member. Can be used as a decorator. Do not make ``obj`` a member. Can be used as a decorator.
.. versionadded:: 3.6 ``Flag``, ``IntFlag``, ``auto`` .. versionadded:: 3.6 ``Flag``, ``IntFlag``, ``auto``

View file

@ -180,7 +180,10 @@ if EXIST "%BUILDDIR%\html\index.html" (
goto end goto end
:check :check
cmd /S /C "%SPHINXLINT% -i tools" rem Check the docs and NEWS files with sphinx-lint.
rem Ignore the tools dir and check that the default role is not used.
cmd /S /C "%SPHINXLINT% -i tools --enable default-role"
cmd /S /C "%SPHINXLINT% --enable default-role ..\Misc\NEWS.d\next\ "
goto end goto end
:serve :serve