mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #5111 from stephenfin/tox-fixes
Run everything but unit tests under Python 3
This commit is contained in:
commit
1ebf6d4983
@ -30,7 +30,7 @@ matrix:
|
||||
env: TOXENV=docs
|
||||
- python: '3.6'
|
||||
env: TOXENV=mypy
|
||||
- python: '2.7'
|
||||
- python: '3.6'
|
||||
env: TOXENV=flake8
|
||||
|
||||
install:
|
||||
|
2
Makefile
2
Makefile
@ -1,4 +1,4 @@
|
||||
PYTHON ?= python
|
||||
PYTHON ?= python3
|
||||
|
||||
.PHONY: all
|
||||
all: clean-pyc clean-backupfiles style-check type-check test
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Makefile for Sphinx documentation
|
||||
#
|
||||
PYTHON ?= python
|
||||
PYTHON ?= python3
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
|
@ -140,7 +140,7 @@ class QtHelpBuilder(StandaloneHTMLBuilder):
|
||||
else:
|
||||
nspace = 'org.sphinx.%s.%s' % (outname, self.config.version)
|
||||
|
||||
nspace = re.sub('[^a-zA-Z0-9.\-]', '', nspace)
|
||||
nspace = re.sub(r'[^a-zA-Z0-9.\-]', '', nspace)
|
||||
nspace = re.sub(r'\.+', '.', nspace).strip('.')
|
||||
nspace = nspace.lower()
|
||||
|
||||
|
@ -45,7 +45,7 @@ locale.versionlabels = DeprecatedDict(
|
||||
RemovedInSphinx30Warning
|
||||
)
|
||||
|
||||
glob_re = re.compile('.*[*?\[].*')
|
||||
glob_re = re.compile(r'.*[*?\[].*')
|
||||
|
||||
|
||||
def int_or_nothing(argument):
|
||||
|
@ -255,7 +255,7 @@ class ExtBabel(Babel):
|
||||
|
||||
def get_mainlanguage_options(self):
|
||||
# type: () -> unicode
|
||||
"""Return options for polyglossia's ``\setmainlanguage``."""
|
||||
"""Return options for polyglossia's ``\\setmainlanguage``."""
|
||||
if self.use_polyglossia is False:
|
||||
return None
|
||||
elif self.language == 'german':
|
||||
|
5
tox.ini
5
tox.ini
@ -27,12 +27,14 @@ commands=
|
||||
pytest -Wall --durations 25 {posargs}
|
||||
|
||||
[testenv:flake8]
|
||||
basepython = python3
|
||||
description =
|
||||
Run style checks.
|
||||
commands =
|
||||
flake8
|
||||
|
||||
[testenv:pylint]
|
||||
basepython = python3
|
||||
description =
|
||||
Run source code analyzer.
|
||||
deps =
|
||||
@ -42,6 +44,7 @@ commands =
|
||||
pylint --rcfile utils/pylintrc sphinx
|
||||
|
||||
[testenv:coverage]
|
||||
basepython = python3
|
||||
description =
|
||||
Run code coverage checks.
|
||||
setenv =
|
||||
@ -51,6 +54,7 @@ commands =
|
||||
coverage report
|
||||
|
||||
[testenv:mypy]
|
||||
basepython = python3
|
||||
description =
|
||||
Run type checks.
|
||||
deps =
|
||||
@ -59,6 +63,7 @@ commands=
|
||||
mypy sphinx/
|
||||
|
||||
[testenv:docs]
|
||||
basepython = python3
|
||||
description =
|
||||
Build documentation.
|
||||
commands =
|
||||
|
Loading…
Reference in New Issue
Block a user