diff --git a/download-more-tests.sh b/download-more-tests.sh index ade2fd5ca..f8bba4fc6 100644 --- a/download-more-tests.sh +++ b/download-more-tests.sh @@ -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" && ( @@ -50,6 +55,7 @@ grep '^# https://' "$0" | ) fi printf "%s\n" "$flags" > "tests/fixtures/friends/$name/flags" + print "-" done # Remove exceptions: diff --git a/sphinxlint/checkers.py b/sphinxlint/checkers.py index ccdfaa2a7..6c159080d 100644 --- a/sphinxlint/checkers.py +++ b/sphinxlint/checkers.py @@ -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.