diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5e1fe5d1..89e836b1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: hooks: - id: check-yaml - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.12 + rev: v0.13.0 hooks: - id: ruff args: [ --fix ] @@ -26,7 +26,7 @@ repos: args: ["--ignore", "D001"] - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v1.17.1' + rev: 'v1.18.1' hooks: - id: mypy additional_dependencies: diff --git a/src/execnet/gateway_base.py b/src/execnet/gateway_base.py index 60fa783c..bdee89af 100644 --- a/src/execnet/gateway_base.py +++ b/src/execnet/gateway_base.py @@ -1007,7 +1007,7 @@ def _no_longer_opened(self, id: int) -> None: except KeyError: pass try: - callback, endmarker, strconfig = self._callbacks.pop(id) + callback, endmarker, _strconfig = self._callbacks.pop(id) except KeyError: pass else: @@ -1037,7 +1037,7 @@ def _local_receive(self, id: int, data) -> None: # executes in receiver thread channel = self._channels.get(id) try: - callback, endmarker, strconfig = self._callbacks[id] + callback, _endmarker, strconfig = self._callbacks[id] except KeyError: queue = channel._items if channel is not None else None if queue is None: diff --git a/src/execnet/script/shell.py b/src/execnet/script/shell.py index cc851a5d..d37a48c2 100644 --- a/src/execnet/script/shell.py +++ b/src/execnet/script/shell.py @@ -26,7 +26,7 @@ def clientside() -> NoReturn: inputlist = [sock, sys.stdin] try: while 1: - r, w, e = select.select(inputlist, [], []) + r, _w, _e = select.select(inputlist, [], []) if sys.stdin in r: line = input() sock.sendall((line + "\n").encode()) diff --git a/testing/test_gateway.py b/testing/test_gateway.py index 8df5f21e..bd527ffe 100644 --- a/testing/test_gateway.py +++ b/testing/test_gateway.py @@ -503,7 +503,7 @@ def test_popen_stderr_tracing( monkeypatch.setenv("EXECNET_DEBUG", "2") gw = makegateway("popen") pid = gw.remote_exec("import os ; channel.send(os.getpid())").receive() - out, err = capfd.readouterr() + _out, err = capfd.readouterr() worker_line = "[%s] creating workergateway" % pid assert worker_line in err gw.exit() diff --git a/testing/test_rsync.py b/testing/test_rsync.py index 40af7ca2..2112439f 100644 --- a/testing/test_rsync.py +++ b/testing/test_rsync.py @@ -142,7 +142,7 @@ def test_rsync_default_reporting( rsync = RSync(source) rsync.add_target(gw1, dirs.dest1) rsync.send() - out, err = capsys.readouterr() + out, _err = capsys.readouterr() assert out.find("hello") != -1 def test_rsync_non_verbose( diff --git a/testing/test_serializer.py b/testing/test_serializer.py index 4c78f1ce..06a84cd2 100644 --- a/testing/test_serializer.py +++ b/testing/test_serializer.py @@ -155,7 +155,7 @@ def test_bool(dump, load) -> None: def test_none(dump, load) -> None: p = dump("None") - tp, s = load(p) + _tp, s = load(p) assert s == "None" diff --git a/testing/test_termination.py b/testing/test_termination.py index 83f0b980..3d14d999 100644 --- a/testing/test_termination.py +++ b/testing/test_termination.py @@ -102,7 +102,7 @@ def test_close_initiating_remote_no_error( popen = subprocess.Popen( [anypython, str(p), str(execnetdir)], stdout=None, stderr=subprocess.PIPE ) - out, err = popen.communicate() + _out, err = popen.communicate() print(err) errstr = err.decode("utf8") lines = [x for x in errstr.splitlines() if "*sys-package" not in x] @@ -151,6 +151,6 @@ def flush(self): popen.stdout.readline() reply = pool.spawn(popen.communicate) reply.get(timeout=50) - out, err = capfd.readouterr() + _out, err = capfd.readouterr() lines = [x for x in err.splitlines() if "*sys-package" not in x] assert not lines or "Killed" in err diff --git a/testing/test_threadpool.py b/testing/test_threadpool.py index becc401c..510ae020 100644 --- a/testing/test_threadpool.py +++ b/testing/test_threadpool.py @@ -164,7 +164,7 @@ def wait_then_put() -> None: pool.execmodel.start(wait_then_put) assert pool.waitall() - out, err = capfd.readouterr() + _out, err = capfd.readouterr() assert err == ""