Skip to content

[pre-commit.ci] pre-commit autoupdate #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
repos:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.1
rev: v1.16.0
hooks:
- id: mypy
name: python mypy
always_run: true
pass_filenames: false
args: ["."]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
rev: v0.11.12
hooks:
- id: ruff
name: ruff-check
Expand Down
2 changes: 1 addition & 1 deletion psqlpy_piccolo/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",),
Expand Down
2 changes: 1 addition & 1 deletion tests/test_extra_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=[])
Expand Down
4 changes: 2 additions & 2 deletions tests/test_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Loading