mirror of
https://github.com/creyD/creyPY.git
synced 2026-04-12 19:30:30 +02:00
fix: fixed issue with new mixin
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from sqlalchemy import Column
|
||||
from sqlalchemy.orm import Mapped
|
||||
|
||||
|
||||
class AutoAnnotateMixin:
|
||||
@@ -8,7 +9,7 @@ class AutoAnnotateMixin:
|
||||
annotations = {}
|
||||
for key, value in cls.__dict__.items():
|
||||
if isinstance(value, Column):
|
||||
annotations[key] = value.type.python_type
|
||||
annotations[key] = Mapped[value.type.python_type]
|
||||
cls.__annotations__ = annotations
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user