From 7e0bc1b0e2f3fb7ee7cfe9678428a7340c7a224f Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Sun, 9 Nov 2025 08:51:46 +0300 Subject: [PATCH] rename some modules --- db_try/__init__.py | 4 ++-- db_try/{helpers.py => dsn.py} | 0 db_try/{decorators.py => retry.py} | 0 tests/{test_helpers.py => test_dsn.py} | 4 ++-- tests/{test_decorators.py => test_retry.py} | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename db_try/{helpers.py => dsn.py} (100%) rename db_try/{decorators.py => retry.py} (100%) rename tests/{test_helpers.py => test_dsn.py} (87%) rename tests/{test_decorators.py => test_retry.py} (96%) diff --git a/db_try/__init__.py b/db_try/__init__.py index b4e7981..8be4859 100644 --- a/db_try/__init__.py +++ b/db_try/__init__.py @@ -1,6 +1,6 @@ from db_try.connections import build_connection_factory -from db_try.decorators import postgres_retry -from db_try.helpers import build_db_dsn, is_dsn_multihost +from db_try.dsn import build_db_dsn, is_dsn_multihost +from db_try.retry import postgres_retry from db_try.transaction import Transaction diff --git a/db_try/helpers.py b/db_try/dsn.py similarity index 100% rename from db_try/helpers.py rename to db_try/dsn.py diff --git a/db_try/decorators.py b/db_try/retry.py similarity index 100% rename from db_try/decorators.py rename to db_try/retry.py diff --git a/tests/test_helpers.py b/tests/test_dsn.py similarity index 87% rename from tests/test_helpers.py rename to tests/test_dsn.py index f79d286..9cae475 100644 --- a/tests/test_helpers.py +++ b/tests/test_dsn.py @@ -1,12 +1,12 @@ import typing -from db_try import helpers, is_dsn_multihost +from db_try import build_db_dsn, is_dsn_multihost def test_build_db_dsn() -> None: database_name: typing.Final = "new_db_name" drivername: typing.Final = "postgresql+asyncpg" - result_dsn: typing.Final = helpers.build_db_dsn( + result_dsn: typing.Final = build_db_dsn( db_dsn="postgresql://login:password@/db_placeholder?host=host1&host=host2", database_name=database_name, drivername=drivername, diff --git a/tests/test_decorators.py b/tests/test_retry.py similarity index 96% rename from tests/test_decorators.py rename to tests/test_retry.py index d20ea90..cc92eca 100644 --- a/tests/test_decorators.py +++ b/tests/test_retry.py @@ -3,7 +3,7 @@ from sqlalchemy.exc import DBAPIError from sqlalchemy.ext import asyncio as sa_async -from db_try.decorators import postgres_retry +from db_try.retry import postgres_retry @pytest.mark.parametrize(