Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-42238: [doc] moving from rstlint.py to sphinx-lint.#31097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
JulienPalard merged 5 commits intopython:mainfromJulienPalard:mdk-sphinx-lint
Feb 10, 2022
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
NextNext commit
bpo-42238: [doc] moving from rstlint.py to sphinx-lint.
  • Loading branch information
@JulienPalard
JulienPalard committedFeb 7, 2022
commitffb8f98869748ad2351597ce7325ff91b4b934e8
5 changes: 3 additions & 2 deletionsDoc/Makefile
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,7 @@
PYTHON = python3
VENVDIR = ./venv
SPHINXBUILD = PATH=$(VENVDIR)/bin:$$PATH sphinx-build
SPHINXLINT = PATH=$(VENVDIR)/bin:$$PATH sphinx-lint
BLURB = PATH=$(VENVDIR)/bin:$$PATH blurb
PAPER =
SOURCES =
Expand DownExpand Up@@ -214,8 +215,8 @@ dist:
rm dist/python-$(DISTVERSION)-docs-texinfo.tar

check:
$(PYTHON) tools/rstlint.py -i tools -i $(VENVDIR) -i README.rst
$(PYTHON) tools/rstlint.py ../Misc/NEWS.d/next/
$(SPHINXLINT) -i tools -i $(VENVDIR) -i README.rst
$(SPHINXLINT) ../Misc/NEWS.d/next/

serve:
$(PYTHON) ../Tools/scripts/serve.py build/html $(SERVE_PORT)
Expand Down
12 changes: 11 additions & 1 deletionDoc/make.bat
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,6 +36,16 @@ if not defined BLURB (
set BLURB=%PYTHON% -m blurb
)

if not defined SPHINXLINT (
%PYTHON% -c "import sphinxlint" > nul 2> nul
if errorlevel 1 (
echo Installing sphinx-lint with %PYTHON%
%PYTHON% -m pip install sphinx-lint
if errorlevel 1 exit /B
)
set SPHINXLINT=%PYTHON% -m sphinxlint
)

if "%1" NEQ "htmlhelp" goto :skiphhcsearch
if exist "%HTMLHELP%" goto :skiphhcsearch

Expand DownExpand Up@@ -168,7 +178,7 @@ if EXIST "%BUILDDIR%\html\index.html" (
goto end

:check
cmd /S /C "%PYTHON% tools\rstlint.py -i tools"
cmd /S /C "%SPHINXLINT% -i tools"
goto end

:serve
Expand Down
2 changes: 2 additions & 0 deletionsDoc/requirements.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,8 @@ sphinx==4.2.0

blurb

sphinx-lint
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Shouldn't this dependency be pinned? I say this because if we refactor sphinx-lint (e.g. as a Sphinx builder as discussed insphinx-contrib/sphinx-lint#1), it will require adaptation here. A new release will have to be made with the changes before they can be used in CPython, and between the release and the actual switch, things will be broken (plus people might not understand what's going on it if they don't pull recent changes but install a newer sphinx-lint).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Another thought: it will make it easier to add checks that might have a few false positives (preferably there won't be any, but it could be tricky to eliminate some rare cases).

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

it will require adaptation here.

I don't think so, but I may miss something. sphinx-lint should be able to find the conf.py by itself, and we'll be able to add a sphinx install dependency, so it looks like it should be doable without adaptation.

Still we can pin<1 and use semver, so if we break something we can bump the major version if you prefer.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The normal way to invoke a Sphinx builder would basically besphinx-build -b lint. I haven't investigated if it's feasible to allow direct invocation by a script; there would be implications on which Sphinx to use for example (from some venv or not?). I think it can't hurt to require<1.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

OK for< 1, done.


# The theme used by the documentation is stored separately, so we need
# to install that as well.
python-docs-theme>=2022.1
Loading

[8]ページ先頭

©2009-2025 Movatter.jp