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

Disable literal block when linting#234

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
rffontenelle merged 3 commits intomainfromlint-disable-literal-block
Oct 17, 2024
Merged
Changes fromall commits
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
27 changes: 23 additions & 4 deletionsscripts/lint.sh
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,11 +18,30 @@ cd "$rootdir"
mkdir -p logs
touch logs/sphinxlint.txt

cd cpython/Doc/locale/${PYDOC_LANGUAGE}/LC_MESSAGES
sphinx-lint | tee $(realpath "$rootdir/logs/sphinxlint.txt")
cd $OLDPWD
cd cpython/Doc

# Remove empty file
# Disable literal blocks and update PO
sed -i "/^\s*'literal-block',/s/ '/ #'/" conf.py
# TODO: use `make -C .. gettext` when there are only Python >= 3.12
opts='-E -b gettext -q -D gettext_compact=0 -d build/.doctrees . build/gettext'
make build ALLSPHINXOPTS="$opts"
# Update translation files with latest POT
sphinx-intl update -d locale -p build/gettext -l ${PYDOC_LANGUAGE} > /dev/null

cd locale/${PYDOC_LANGUAGE}/LC_MESSAGES
sphinx-lint 2> $(realpath "$rootdir/logs/sphinxlint.txt")

# Undo changes to undo literal blocks disabling
git checkout .

cd "$rootdir"

# Check of logfile is empty
if [ ! -s logs/sphinxlint.txt ]; then
# OK, it is empty. Remove it.
rm logs/sphinxlint.txt
else
# print contents and exit with error status (to trigger notification in CI)
cat logs/sphinxlint.txt
exit 1
fi

[8]ページ先頭

©2009-2025 Movatter.jp