From 74c846badc122f60fe971ad1d60526855fc5b170 Mon Sep 17 00:00:00 2001 From: David Maxson Date: Mon, 3 Jun 2024 10:33:24 -0700 Subject: [PATCH] Type annotation tweaks --- src/pynamodb_single_table/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pynamodb_single_table/base.py b/src/pynamodb_single_table/base.py index dd0aaea..141cd8a 100644 --- a/src/pynamodb_single_table/base.py +++ b/src/pynamodb_single_table/base.py @@ -2,6 +2,7 @@ import itertools import uuid from inspect import isabstract +from typing import Optional from typing import Tuple from typing import Type @@ -41,7 +42,7 @@ class SingleTableBaseModel(BaseModel): _PynamodbMeta: MetaProtocol = PrivateAttr() __pynamodb_model__: Type[RootModelPrototype] = None - uid: uuid.UUID | None = None + uid: Optional[uuid.UUID] = None def __init_subclass__(cls, **kwargs): if cls.__pynamodb_model__: