From c6d89217e5ce7bfe8d98f6f52dd6d4a35bf022ca Mon Sep 17 00:00:00 2001 From: Matteo Campinoti Date: Fri, 25 Oct 2024 11:04:00 +0200 Subject: [PATCH] database - remove unnecessary explicit TypeAlias type --- acacore/database/database.py | 3 +-- acacore/database/table.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/acacore/database/database.py b/acacore/database/database.py index 4ce0e60..4c1e28e 100644 --- a/acacore/database/database.py +++ b/acacore/database/database.py @@ -10,7 +10,6 @@ from typing import overload from typing import Self from typing import Type -from typing import TypeAlias from typing import TypeVar from pydantic import BaseModel @@ -21,7 +20,7 @@ from .table_view import View _M = TypeVar("_M", bound=BaseModel) -_P: TypeAlias = Sequence[SQLValue] | Mapping[str, SQLValue] +_P = Sequence[SQLValue] | Mapping[str, SQLValue] class Database: diff --git a/acacore/database/table.py b/acacore/database/table.py index e5a3c76..b1004c1 100644 --- a/acacore/database/table.py +++ b/acacore/database/table.py @@ -6,7 +6,6 @@ from typing import Literal from typing import Self from typing import Type -from typing import TypeAlias from typing import TypeVar from pydantic import BaseModel @@ -16,7 +15,7 @@ from .cursor import Cursor _M = TypeVar("_M", bound=BaseModel) -_W: TypeAlias = str | dict[str, SQLValue | list[SQLValue]] +_W = str | dict[str, SQLValue | list[SQLValue]] def _where_dict_to_sql(where: dict[str, SQLValue | list[SQLValue]]) -> tuple[str, list[SQLValue]]: