Skip to content

Commit

Permalink
blow up poetry with my brain
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuyukai committed Oct 28, 2024
1 parent 1701d63 commit 60f2a8e
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/conversion.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 5 additions & 7 deletions src/pg_purepy/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tests/converters/test_enum_converter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from enum import Enum
from enum import Enum, StrEnum

import pytest
from pg_purepy.conversion.enums import EnumConverter
Expand All @@ -14,7 +14,7 @@ class StandardEnum(Enum):
THREE = 3


class StringEnum(str, Enum):
class StringEnum(StrEnum):
THREE = "one"
ONE = "two"
TWO = "three"
Expand Down

0 comments on commit 60f2a8e

Please sign in to comment.