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 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() pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy