diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3ff71f9..8e246cd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-toml - id: debug-statements @@ -10,7 +10,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.3.5 + rev: v0.7.1 hooks: - id: ruff args: ["--preview", "--fix"] diff --git a/docs/changelog.rst b/docs/changelog.rst index f8cd444..1d0ddf2 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -9,7 +9,7 @@ Changelog 0.11.0 (2024-04-12) ------------------- -- Switch to the ``whenever`` package for date/time types, instead of Arrow. See +- Switch to the ``whenever`` package for date/time types, instead of Arrow. See https://dev.arie.bovenberg.net/blog/python-datetime-pitfalls/ for more information as to why. - ``pg-purepy`` now passes Pyright strict mode. - :class:`.Converter` is now a generic type. diff --git a/docs/conversion.rst b/docs/conversion.rst index c942f9c..80b0233 100644 --- a/docs/conversion.rst +++ b/docs/conversion.rst @@ -35,7 +35,7 @@ Date/Time types .. note:: - I use Whenever over the vanilla ``datetime`` objects because I don't like ``datetime``. Write + I use Whenever over the vanilla ``datetime`` objects because I don't like ``datetime``. Write your own converter if you disagree with me. Enumeration types diff --git a/poetry.lock b/poetry.lock index adea427..e47175e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1215,4 +1215,4 @@ docs = [] [metadata] lock-version = "2.0" python-versions = ">=3.11" -content-hash = "53b27065bd609d97a2eb0760c29c3e0f3cdf8cd8a9aadecbb399b9ed09d01f32" +content-hash = "361005ff24339d72bcd6747638257ab27988936a77482ad279200b923ce98ba8" diff --git a/pyproject.toml b/pyproject.toml index c014910..67bb5ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ structlog = ">=24.4.0" whenever = ">=0.6.9" [tool.poetry.group.docs.dependencies] -sphinx = ">=8.1.3" +sphinx = ">=8.1.3" sphinx-inline-tabs = ">=2023.4.21" sphinx-autodoc-typehints = ">=2.5.0" sphinxcontrib-jquery = ">=4.1" diff --git a/src/pg_purepy/connection.py b/src/pg_purepy/connection.py index 9d092b1..fa414d4 100644 --- a/src/pg_purepy/connection.py +++ b/src/pg_purepy/connection.py @@ -289,13 +289,11 @@ async def lowlevel_query( if not self._protocol.ready: await self.wait_until_ready() - simple_query = all( - ( - not (params or kwargs), - not isinstance(query, PreparedStatementInfo), - max_rows is None, - ) - ) + simple_query = all(( + not (params or kwargs), + not isinstance(query, PreparedStatementInfo), + max_rows is None, + )) logger.debug("Executing query", query=query) if simple_query: diff --git a/tests/converters/test_enum_converter.py b/tests/converters/test_enum_converter.py index dd3663c..7029515 100644 --- a/tests/converters/test_enum_converter.py +++ b/tests/converters/test_enum_converter.py @@ -1,4 +1,4 @@ -from enum import Enum +from enum import Enum, StrEnum import pytest from pg_purepy.conversion.enums import EnumConverter @@ -14,7 +14,7 @@ class StandardEnum(Enum): THREE = 3 -class StringEnum(str, Enum): +class StringEnum(StrEnum): THREE = "one" ONE = "two" TWO = "three"