Skip to content

Commit

Permalink
disposable: test sphinx-contrib#115
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwang44 committed Aug 30, 2024
1 parent ec6262e commit 05c1f8b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
26 changes: 16 additions & 10 deletions download-more-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,29 @@

# https://github.com/jazzband/django-oauth-toolkit docs
# https://github.com/neo4j/neo4j-python-driver docs
# https://github.com/pandas-dev/pandas doc
# https://github.com/python/peps . --disable=trailing-whitespace
# https://github.com/python/cpython Doc --enable default-role
# https://github.com/python/devguide/ . --enable default-role
# https://github.com/spyder-ide/spyder-docs doc --enable all --disable line-too-long
# https://github.com/sympy/sympy doc
# https://github.com/sphinx-doc/sphinx doc --enable line-too-long --max-line-length 85
# https://github.com/python/python-docs-fr . --enable all --disable line-too-long
# https://github.com/mattwang44/pandas doc fix-unnecessary-parentheses-in-rst-content
# https://github.com/python/peps . '' --disable=trailing-whitespace
# https://github.com/mattwang44/cpython Doc fix-unnecessary-parentheses-in-rst-content --enable default-role
# https://github.com/python/devguide/ . '' --enable default-role
# https://github.com/spyder-ide/spyder-docs doc '' --enable all --disable line-too-long
# https://github.com/mattwang44/sympy doc fix-unnecessary-parentheses-in-rst-content
# https://github.com/mattwang44/sphinx doc fix-unnecessary-parentheses-in-rst-content --enable line-too-long --max-line-length 85
# https://github.com/python/python-docs-fr . '' --enable all --disable line-too-long

grep '^# https://' "$0" |
while read -r _ repo directory flags
while read -r _ repo directory branch flags
do
name="$(basename "$repo")"
target="tests/fixtures/friends/$name"
rm -fr "$target"
if [ "$directory" = "." ]
then
git clone --depth 1 "$repo" "tests/fixtures/friends/$name"
if [ "$branch" = '' ]
then
git clone --depth 1 "$repo" "tests/fixtures/friends/$name"
else
git clone --depth 1 "$repo" "tests/fixtures/friends/$name" -b "$branch"
fi
else
git clone --depth 1 --sparse --filter=blob:none "$repo" "tests/fixtures/friends/$name" &&
(
Expand All @@ -50,6 +55,7 @@ grep '^# https://' "$0" |
)
fi
printf "%s\n" "$flags" > "tests/fixtures/friends/$name/flags"
print "-"
done

# Remove exceptions:
Expand Down
2 changes: 1 addition & 1 deletion sphinxlint/checkers.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def check_dangling_hyphen(file, lines, options):
yield lno + 1, "Line ends with dangling hyphen"


@checker(".rst", ".po", rst_only=False, enabled=False)
@checker(".rst", ".po", rst_only=False, enabled=True)
def check_unnecessary_func_parentheses(filename, lines, options):
"""Check for unnecessary parentheses in :func: roles.
Expand Down

0 comments on commit 05c1f8b

Please sign in to comment.