diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c3beeb26ce..a2588a2ea4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ default_language_version: python: python3 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.0.1 + rev: v3.1.0 hooks: - id: check-ast - id: check-builtin-literals @@ -14,18 +14,18 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/asottile/pyupgrade - rev: v2.4.3 + rev: v2.7.1 hooks: - id: pyupgrade - repo: https://github.com/asottile/seed-isort-config - rev: v2.1.1 + rev: v2.2.0 hooks: - id: seed-isort-config args: - --application-directories - .:src - repo: https://github.com/pre-commit/mirrors-isort - rev: v4.3.21 + rev: v5.1.4 hooks: - id: isort - repo: https://github.com/ambv/black @@ -51,14 +51,14 @@ repos: hooks: - id: rst-backticks - repo: https://github.com/asottile/setup-cfg-fmt - rev: v1.9.0 + rev: v1.11.0 hooks: - id: setup-cfg-fmt args: - --min-py3-version - '3.4' - repo: https://gitlab.com/pycqa/flake8 - rev: 3.8.1 + rev: 3.8.3 hooks: - id: flake8 additional_dependencies: diff --git a/setup.cfg b/setup.cfg index 4705f79bd7..8143fddc55 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,6 +5,7 @@ long_description = file: README.md long_description_content_type = text/markdown url = http://tox.readthedocs.org author = Holger Krekel, Oliver Bestwalter, Bernát Gábor and others +maintainer = Bernat Gabor, Oliver Bestwalter, Anthony Asottile license = MIT license_file = LICENSE platforms = any @@ -27,7 +28,6 @@ classifiers = Topic :: Software Development :: Testing Topic :: Utilities keywords = virtual, environments, isolated, testing -maintainer = Bernat Gabor, Oliver Bestwalter, Anthony Asottile maintainer-email = tox-dev@python.org project_urls = Source=https://github.com/tox-dev/tox @@ -54,20 +54,20 @@ console_scripts = [options.extras_require] docs = - sphinx >= 2.0.0 - towncrier >= 18.5.0 - pygments-github-lexers >= 0.0.5 - sphinxcontrib-autoprogram >= 0.1.5 + pygments-github-lexers>=0.0.5 + sphinx>=2.0.0 + sphinxcontrib-autoprogram>=0.1.5 + towncrier>=18.5.0 testing = - freezegun >= 0.3.11 - pathlib2 >= 2.3.3 - pytest >= 4.0.0 - pytest-cov >= 2.5.1 - pytest-mock >= 1.10.0 - pytest-xdist >= 1.22.2 - pytest-randomly >= 1.0.0 - psutil >= 5.6.1; python_version != "3.4" - flaky >= 3.4.0 + flaky>=3.4.0 + freezegun>=0.3.11 + pathlib2>=2.3.3 + pytest>=4.0.0 + pytest-cov>=2.5.1 + pytest-mock>=1.10.0 + pytest-randomly>=1.0.0 + pytest-xdist>=1.22.2 + psutil>=5.6.1;python_version != "3.4" [options.packages.find] where = src diff --git a/src/tox/interpreters/__init__.py b/src/tox/interpreters/__init__.py index c034319895..21fb63817f 100644 --- a/src/tox/interpreters/__init__.py +++ b/src/tox/interpreters/__init__.py @@ -72,7 +72,7 @@ def run_and_get_interpreter_info(name, executable): def exec_on_interpreter(*args): - from subprocess import Popen, PIPE + from subprocess import PIPE, Popen popen = Popen(args, stdout=PIPE, stderr=PIPE, universal_newlines=True) out, err = popen.communicate() diff --git a/src/tox/session/__init__.py b/src/tox/session/__init__.py index 27d6310e7c..b34508a69a 100644 --- a/src/tox/session/__init__.py +++ b/src/tox/session/__init__.py @@ -46,6 +46,7 @@ def cmdline(args=None): def setup_reporter(args): from argparse import ArgumentParser + from tox.config.reporter import add_verbosity_commands parser = ArgumentParser(add_help=False) diff --git a/src/tox/util/stdlib.py b/src/tox/util/stdlib.py index 5f687b737a..29a3f78bda 100644 --- a/src/tox/util/stdlib.py +++ b/src/tox/util/stdlib.py @@ -24,7 +24,7 @@ def is_main_thread(): def suppress_output(): """suppress both stdout and stderr outputs""" if sys.version_info >= (3, 5): - from contextlib import redirect_stdout, redirect_stderr + from contextlib import redirect_stderr, redirect_stdout else: class _RedirectStream(object): diff --git a/tests/unit/interpreters/windows/test_windows.py b/tests/unit/interpreters/windows/test_windows.py index 43cb7ccade..06e9bddae9 100644 --- a/tests/unit/interpreters/windows/test_windows.py +++ b/tests/unit/interpreters/windows/test_windows.py @@ -3,8 +3,8 @@ @mark_dont_run_on_posix def test_locate_via_pep514(monkeypatch): - from tox.interpreters.py_spec import CURRENT import tox.interpreters.windows + from tox.interpreters.py_spec import CURRENT del tox.interpreters.windows._PY_AVAILABLE[:] exe = tox.interpreters.windows.locate_via_pep514(CURRENT) diff --git a/tests/unit/package/test_package_parallel.py b/tests/unit/package/test_package_parallel.py index 493e29b92d..3acd5952e9 100644 --- a/tests/unit/package/test_package_parallel.py +++ b/tests/unit/package/test_package_parallel.py @@ -28,9 +28,10 @@ def test_tox_parallel_build_safe(initproj, cmd, mock_venv, monkeypatch): # t1 is artificially blocked to run test command until t2 finishes build # (parallel build package present) # t2 package build finishes both t1 and t2 can now finish and clean up their build packages - import tox.package import threading + import tox.package + t1_build_started = threading.Event() t1_build_blocker = threading.Event() t2_build_started = threading.Event()