From b75c971bbb6b89f0718ad1b3a2db6d568ed8ba98 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 17:09:29 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.15.22 → v0.16.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.22...v0.16.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ed34148..2c8970b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: - id: trailing-whitespace - id: check-added-large-files - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.22 + rev: v0.16.0 hooks: - id: ruff - id: ruff-format From 6e1976e5a0880159bac4e5f76543f84e44f18f93 Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Wed, 29 Jul 2026 20:37:54 -0700 Subject: [PATCH 2/2] fix: apply ruff 0.16.0's RUF015 fix ruff 0.16.0 adds RUF015, which flags `list(connections)[0]` and classes the rewrite as unsafe, so the autoupdate's own hook run can't apply it. `connections` is a re-iterable container here, so `next(iter(...))` is equivalent. Co-Authored-By: Claude Opus 5 (1M context) --- pyprql/tests/test_magic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyprql/tests/test_magic.py b/pyprql/tests/test_magic.py index c3442cb..c1051ba 100644 --- a/pyprql/tests/test_magic.py +++ b/pyprql/tests/test_magic.py @@ -396,7 +396,7 @@ def test_json_in_select(ip): def test_close_connection(ip): # TODO: change this to testing run_prql connections = run_sql(ip, "%sql -l") - connection_name = list(connections)[0] + connection_name = next(iter(connections)) run_sql(ip, f"%sql -x {connection_name}") connections_afterward = run_sql(ip, "%sql -l") assert connection_name not in connections_afterward