]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Restore default role check in `make check`. (#92290)
authorEzio Melotti <ezio.melotti@gmail.com>
Sun, 15 May 2022 15:34:52 +0000 (17:34 +0200)
committerGitHub <noreply@github.com>
Sun, 15 May 2022 15:34:52 +0000 (17:34 +0200)
* 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>
Doc/Makefile
Doc/library/datetime.rst
Doc/library/enum.rst
Doc/make.bat

index 3a3417bf99af3b9466a292d054787ac6187a5937..8a757a68b6f523ba5b73e700471d9f9c0617193b 100644 (file)
@@ -213,8 +213,10 @@ dist:
        rm dist/python-$(DISTVERSION)-docs-texinfo.tar
 
 check:
-       $(SPHINXLINT) -i tools -i $(VENVDIR) -i README.rst
-       $(SPHINXLINT) ../Misc/NEWS.d/next/
+       # Check the docs and NEWS files with sphinx-lint.
+       # 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:
        @echo "The serve target was removed, use htmlview instead (see bpo-36329)"
index e0b28d7cb978d9ed2910601df2d34c8d7716ffcb..bde24ec5f2e11e248ac4e73e60fda456d9a9b334 100644 (file)
@@ -998,7 +998,7 @@ Other constructors, all class methods:
    ISO 8601 format, with the following exceptions:
 
    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.
    4. Fractional hours and minutes are not supported.
 
index 5829d4617893bed526ecbcabcc2602fd914a4ae0..c3256c56c6366f4a987c9c6ab72809a867785b5e 100644 (file)
@@ -126,11 +126,11 @@ Module Contents
 
    :func:`member`
 
-      Make `obj` a member.  Can be used as a decorator.
+      Make ``obj`` a member.  Can be used as a decorator.
 
    :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``
index d9a7aa4ca7fa6ce16f29e8e0982fdf3fd06b5f2e..4f0b3c11f4facb622b46636b407575d8ebbbf6e0 100644 (file)
@@ -180,7 +180,10 @@ if EXIST "%BUILDDIR%\html\index.html" (
 goto end
 
 :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
 
 :serve