From 65995463b6bdce28fc75de69308582001f19e70b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 17:11:26 +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/pre-commit/mirrors-mypy: v1.10.1 → v1.16.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.10.1...v1.16.1) - [github.com/astral-sh/ruff-pre-commit: v0.5.0 → v0.12.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.0...v0.12.0) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 29e5d8e..4f7e110 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.10.1 + rev: v1.16.1 hooks: - id: mypy name: python mypy @@ -8,7 +8,7 @@ repos: pass_filenames: false args: ["."] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.0 + rev: v0.12.0 hooks: - id: ruff name: ruff-check From cb1211f32aaa68e52c2dc43a315b128c743620d3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 17:11:40 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- psqlpy_piccolo/engine.py | 2 +- .../piccolo_migrations/mega_2024_07_20t20_40_36_665178.py | 2 +- .../piccolo_migrations/music_2024_07_22t21_13_06_549001.py | 2 +- tests/test_extra_node.py | 2 +- tests/test_pool.py | 4 ++-- tests/test_transaction.py | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/psqlpy_piccolo/engine.py b/psqlpy_piccolo/engine.py index 48b3f91..fe6e9e1 100644 --- a/psqlpy_piccolo/engine.py +++ b/psqlpy_piccolo/engine.py @@ -352,7 +352,7 @@ class PSQLPyEngine(Engine[PostgresTransaction]): engine_type = "postgres" min_version_number = 10 - def __init__( # noqa: PLR0913 + def __init__( self: Self, config: dict[str, Any], extensions: Sequence[str] = ("uuid-ossp",), diff --git a/tests/test_apps/mega/piccolo_migrations/mega_2024_07_20t20_40_36_665178.py b/tests/test_apps/mega/piccolo_migrations/mega_2024_07_20t20_40_36_665178.py index a031e68..416fdc4 100644 --- a/tests/test_apps/mega/piccolo_migrations/mega_2024_07_20t20_40_36_665178.py +++ b/tests/test_apps/mega/piccolo_migrations/mega_2024_07_20t20_40_36_665178.py @@ -301,7 +301,7 @@ async def forwards() -> None: column_class_name="Numeric", column_class=Numeric, params={ - "default": decimal.Decimal("0"), + "default": decimal.Decimal(0), "digits": (5, 2), "null": False, "primary_key": False, diff --git a/tests/test_apps/music/piccolo_migrations/music_2024_07_22t21_13_06_549001.py b/tests/test_apps/music/piccolo_migrations/music_2024_07_22t21_13_06_549001.py index de21cb5..9210875 100644 --- a/tests/test_apps/music/piccolo_migrations/music_2024_07_22t21_13_06_549001.py +++ b/tests/test_apps/music/piccolo_migrations/music_2024_07_22t21_13_06_549001.py @@ -525,7 +525,7 @@ async def forwards() -> None: column_class_name="Numeric", column_class=Numeric, params={ - "default": decimal.Decimal("0"), + "default": decimal.Decimal(0), "digits": (5, 2), "null": False, "primary_key": False, diff --git a/tests/test_extra_node.py b/tests/test_extra_node.py index 0d02b23..4dc9f27 100644 --- a/tests/test_extra_node.py +++ b/tests/test_extra_node.py @@ -16,7 +16,7 @@ def skip_test_extra_nodes() -> None: test_engine = engine_finder() assert test_engine is not None - test_engine = typing.cast(PSQLPyEngine, test_engine) + test_engine = typing.cast("PSQLPyEngine", test_engine) EXTRA_NODE: typing.Final = MagicMock(spec=PSQLPyEngine(config=test_engine.config)) # noqa: N806 EXTRA_NODE.run_querystring = AsyncMock(return_value=[]) diff --git a/tests/test_pool.py b/tests/test_pool.py index 1cd6166..663df78 100644 --- a/tests/test_pool.py +++ b/tests/test_pool.py @@ -11,7 +11,7 @@ async def test_create_pool() -> None: - engine: typing.Final = typing.cast(PSQLPyEngine, Manager._meta.db) + engine: typing.Final = typing.cast("PSQLPyEngine", Manager._meta.db) await engine.start_connection_pool() assert engine.pool is not None @@ -45,7 +45,7 @@ async def get_data() -> None: async def test_proxy_methods() -> None: - engine: typing.Final = typing.cast(PSQLPyEngine, Manager._meta.db) + engine: typing.Final = typing.cast("PSQLPyEngine", Manager._meta.db) # Deliberate typo ('nnn'): await engine.start_connnection_pool() diff --git a/tests/test_transaction.py b/tests/test_transaction.py index 09b9328..7e50ef0 100644 --- a/tests/test_transaction.py +++ b/tests/test_transaction.py @@ -93,7 +93,7 @@ async def get_transaction_ids() -> list[str]: async def test_transaction_exists() -> None: """Make sure we can detect when code is within a transaction.""" - engine: typing.Final = typing.cast(PSQLPyEngine, Manager._meta.db) + engine: typing.Final = typing.cast("PSQLPyEngine", Manager._meta.db) async with engine.transaction(): assert engine.transaction_exists()