From 4a48f58013289498798911646bab583a073ae362 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 6 Nov 2020 18:51:35 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=91=20Remove=20PyModel,=20as=20it=20do?= =?UTF-8?q?esn't=20work=20as=20expected?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 1 - royalnet/alchemist/__init__.py | 1 - royalnet/alchemist/model.py | 15 --------------- 3 files changed, 17 deletions(-) delete mode 100644 royalnet/alchemist/model.py diff --git a/pyproject.toml b/pyproject.toml index 7bfd30bf..1eca9130 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,6 @@ redis = "^3.5.3" hiredis = "^1.1.0" sqlalchemy = "^1.3.19" toml = "^0.10.1" -pydantic-sqlalchemy = "^0.0.7" [tool.poetry.dev-dependencies] pytest = "^6.1.1" diff --git a/royalnet/alchemist/__init__.py b/royalnet/alchemist/__init__.py index ca3e7d85..2dc00c5e 100644 --- a/royalnet/alchemist/__init__.py +++ b/royalnet/alchemist/__init__.py @@ -1,3 +1,2 @@ from .func import * from .repr import * -from .model import * diff --git a/royalnet/alchemist/model.py b/royalnet/alchemist/model.py deleted file mode 100644 index ff696253..00000000 --- a/royalnet/alchemist/model.py +++ /dev/null @@ -1,15 +0,0 @@ -import pydantic_sqlalchemy -import functools - - -class PyModel: - """A mixin that can be added to a declared class to generate a Pydantic model from it.""" - - @classmethod - def pydantic(cls): - return pydantic_sqlalchemy.sqlalchemy_to_pydantic(cls) - - -__all__ = ( - "PyModel", -)