Merge pull request #5111 from stephenfin/tox-fixes

Run everything but unit tests under Python 3
This commit is contained in:
Takeshi KOMIYA 2018-06-26 00:59:36 +09:00 committed by GitHub
commit 1ebf6d4983
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 6 deletions

View File

@ -30,7 +30,7 @@ matrix:
env: TOXENV=docs
- python: '3.6'
env: TOXENV=mypy
- python: '2.7'
- python: '3.6'
env: TOXENV=flake8
install:

View File

@ -1,4 +1,4 @@
PYTHON ?= python
PYTHON ?= python3
.PHONY: all
all: clean-pyc clean-backupfiles style-check type-check test

View File

@ -1,6 +1,6 @@
# Makefile for Sphinx documentation
#
PYTHON ?= python
PYTHON ?= python3
# You can set these variables from the command line.
SPHINXOPTS =

View File

@ -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()

View File

@ -45,7 +45,7 @@ locale.versionlabels = DeprecatedDict(
RemovedInSphinx30Warning
)
glob_re = re.compile('.*[*?\[].*')
glob_re = re.compile(r'.*[*?\[].*')
def int_or_nothing(argument):

View File

@ -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':

View File

@ -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 =