diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0a7ef668..7e413f3d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,11 +3,11 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: trailing-whitespace - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.5.1 + rev: v1.18.2 hooks: - id: mypy name: python mypy @@ -15,7 +15,7 @@ repos: pass_filenames: false args: ["python"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.1 + rev: v0.14.0 hooks: - id: ruff name: ruff diff --git a/python/psqlpy/_internal/__init__.pyi b/python/psqlpy/_internal/__init__.pyi index ee41556a..e2eb29c5 100644 --- a/python/psqlpy/_internal/__init__.pyi +++ b/python/psqlpy/_internal/__init__.pyi @@ -22,7 +22,7 @@ class QueryResult: @typing.overload def result( self: Self, - as_tuple: typing.Literal[None] = None, + as_tuple: None = None, custom_decoders: dict[str, Callable[[bytes], Any]] | None = None, ) -> list[dict[str, Any]]: ... @typing.overload @@ -112,7 +112,7 @@ class SingleQueryResult: @typing.overload def result( self: Self, - as_tuple: typing.Literal[None] = None, + as_tuple: None = None, custom_decoders: dict[str, Callable[[bytes], Any]] | None = None, ) -> dict[str, Any]: ... @typing.overload diff --git a/python/tests/test_kwargs_parameters.py b/python/tests/test_kwargs_parameters.py index 885e99f9..4d92daec 100644 --- a/python/tests/test_kwargs_parameters.py +++ b/python/tests/test_kwargs_parameters.py @@ -77,6 +77,6 @@ async def test_failed_no_parameter( async with psql_pool.acquire() as conn: with pytest.raises(expected_exception=PyToRustValueMappingError): await conn.execute( - querystring=(f"SELECT * FROM {table_name} " "WHERE name = $(name)p"), # noqa: ISC001 + querystring=(f"SELECT * FROM {table_name} WHERE name = $(name)p"), # noqa: ISC001 parameters={"mistake": "wow"}, )