diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c056785..eb3e7bc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,24 +1,24 @@ repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.15.2 + rev: v3.21.2 hooks: - id: pyupgrade args: ["--py38-plus"] - repo: https://github.com/asottile/reorder-python-imports - rev: v3.12.0 + rev: v3.16.0 hooks: - id: reorder-python-imports - - repo: https://github.com/psf/black - rev: 24.4.2 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.1.0 hooks: - id: black - repo: https://github.com/PyCQA/flake8 - rev: 7.0.0 + rev: 7.3.0 hooks: - id: flake8 additional_dependencies: [flake8-bugbear] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v6.0.0 hooks: - id: check-byte-order-marker - id: trailing-whitespace diff --git a/tests/test_functional_workflow.py b/tests/test_functional_workflow.py index 3c844f1..8527244 100644 --- a/tests/test_functional_workflow.py +++ b/tests/test_functional_workflow.py @@ -3,8 +3,7 @@ def test_functional_work_flow(testdir, tcp_port): server_path = Path(__file__).parent.joinpath("server.py").absolute() - testdir.makepyfile( - """ + testdir.makepyfile(""" import sys import socket from xprocess import ProcessStarter @@ -29,9 +28,7 @@ class Starter(ProcessStarter): sock.sendall(bytes(data, "utf-8")) received = str(sock.recv(1024), "utf-8") assert received == data.upper() - """ - % (tcp_port, str(server_path)) - ) + """ % (tcp_port, str(server_path))) result = testdir.runpytest() result.stdout.fnmatch_lines("*1 passed*") result = testdir.runpytest("--xshow") diff --git a/tests/test_interruption_clean_up.py b/tests/test_interruption_clean_up.py index 8596273..8063ac7 100644 --- a/tests/test_interruption_clean_up.py +++ b/tests/test_interruption_clean_up.py @@ -3,8 +3,7 @@ def test_interruption_cleanup(testdir, tcp_port): server_path = Path(__file__).parent.joinpath("server.py").absolute() - testdir.makepyfile( - """ + testdir.makepyfile(""" import sys import socket from xprocess import ProcessStarter @@ -21,9 +20,7 @@ class Starter(ProcessStarter): xprocess.ensure("server_test_interrupt", Starter) raise KeyboardInterrupt - """ - % (tcp_port, str(server_path)) - ) + """ % (tcp_port, str(server_path))) result = testdir.runpytest_subprocess() result.stdout.fnmatch_lines("*KeyboardInterrupt*") result = testdir.runpytest("--xshow") @@ -32,8 +29,7 @@ class Starter(ProcessStarter): def test_interruption_does_not_cleanup(testdir, tcp_port): server_path = Path(__file__).parent.joinpath("server.py").absolute() - testdir.makepyfile( - """ + testdir.makepyfile(""" import sys import socket from xprocess import ProcessStarter @@ -49,9 +45,7 @@ class Starter(ProcessStarter): xprocess.ensure("server_test_interrupt_no_terminate", Starter) raise KeyboardInterrupt - """ - % (tcp_port, str(server_path)) - ) + """ % (tcp_port, str(server_path))) result = testdir.runpytest_subprocess() result.stdout.fnmatch_lines("*KeyboardInterrupt*") result = testdir.runpytest("--xshow") diff --git a/xprocess/xprocess.py b/xprocess/xprocess.py index 0df85f4..2b5988e 100644 --- a/xprocess/xprocess.py +++ b/xprocess/xprocess.py @@ -14,7 +14,6 @@ import psutil - XPROCESS_BLOCK_DELIMITER = "@@__xproc_block_delimiter__@@" @@ -391,9 +390,7 @@ def wait_callback(self): raise TimeoutError( "The provided startup callback could not assert process\ responsiveness within the specified time interval of {} \ - seconds".format( - self.timeout - ) + seconds".format(self.timeout) ) def wait(self, log_file):