From e66a59d1c506e3e9cbf4e50ee8e32a47373ba46b Mon Sep 17 00:00:00 2001 From: Cody Fincher <204685+cofin@users.noreply.github.com> Date: Wed, 11 Dec 2024 08:57:49 -0600 Subject: [PATCH] fix: revert to `Optional` style type syntax (#314) --- advanced_alchemy/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/advanced_alchemy/base.py b/advanced_alchemy/base.py index 96e9b335..d95eac4a 100644 --- a/advanced_alchemy/base.py +++ b/advanced_alchemy/base.py @@ -6,7 +6,7 @@ import contextlib import re from datetime import date, datetime -from typing import TYPE_CHECKING, Any, Iterator, Protocol, cast, runtime_checkable +from typing import TYPE_CHECKING, Any, Iterator, Optional, Protocol, cast, runtime_checkable from uuid import UUID from sqlalchemy import Date, MetaData, String @@ -346,7 +346,7 @@ class AdvancedDeclarativeBase(DeclarativeBase): registry = orm_registry __abstract__ = True __metadata_registry__: MetadataRegistry = MetadataRegistry() - __bind_key__: str | None = None + __bind_key__: Optional[None] = None # noqa: UP007 def __init_subclass__(cls, **kwargs: Any) -> None: bind_key = getattr(cls, "__bind_key__", None)