diff --git a/aiosnow/models/__init__.py b/aiosnow/models/__init__.py index e9e7a57..13ffc12 100644 --- a/aiosnow/models/__init__.py +++ b/aiosnow/models/__init__.py @@ -1,3 +1,3 @@ from .attachment import AttachmentModel from .table import TableModel -from ._base.schema import fields, ModelSchema, ModelSchemaMeta, Pluck, BaseField +from ._schema import fields, ModelSchema, ModelSchemaMeta, Pluck, BaseField diff --git a/aiosnow/models/_base/__init__.py b/aiosnow/models/_base/__init__.py index d8277ad..1ab3b87 100644 --- a/aiosnow/models/_base/__init__.py +++ b/aiosnow/models/_base/__init__.py @@ -1,4 +1,3 @@ -from .schema import fields, ModelSchema, ModelSchemaMeta, Pluck, Nested, BaseField from .model import BaseModel, BaseModelMeta from .table import BaseTableModel diff --git a/aiosnow/models/_base/model.py b/aiosnow/models/_base/model.py index 6310a61..839ad90 100644 --- a/aiosnow/models/_base/model.py +++ b/aiosnow/models/_base/model.py @@ -18,7 +18,7 @@ methods, ) -from .._base.schema import ModelSchema, ModelSchemaMeta, Nested, BaseField +from .._schema import ModelSchema, ModelSchemaMeta, BaseField, Nested req_cls_map = { methods.GET: GetRequest, diff --git a/aiosnow/models/_base/schema/__init__.py b/aiosnow/models/_schema/__init__.py similarity index 100% rename from aiosnow/models/_base/schema/__init__.py rename to aiosnow/models/_schema/__init__.py diff --git a/aiosnow/models/_base/schema/fields/__init__.py b/aiosnow/models/_schema/fields/__init__.py similarity index 100% rename from aiosnow/models/_base/schema/fields/__init__.py rename to aiosnow/models/_schema/fields/__init__.py diff --git a/aiosnow/models/_base/schema/fields/base.py b/aiosnow/models/_schema/fields/base.py similarity index 90% rename from aiosnow/models/_base/schema/fields/base.py rename to aiosnow/models/_schema/fields/base.py index 6428bd4..5db5810 100644 --- a/aiosnow/models/_base/schema/fields/base.py +++ b/aiosnow/models/_schema/fields/base.py @@ -2,7 +2,7 @@ import marshmallow -from aiosnow.models._base.schema.helpers import Pluck +from aiosnow.models._schema.helpers.pluck import Pluck class BaseField(marshmallow.fields.Field): diff --git a/aiosnow/models/_base/schema/fields/boolean.py b/aiosnow/models/_schema/fields/boolean.py similarity index 100% rename from aiosnow/models/_base/schema/fields/boolean.py rename to aiosnow/models/_schema/fields/boolean.py diff --git a/aiosnow/models/_base/schema/fields/datetime.py b/aiosnow/models/_schema/fields/datetime.py similarity index 100% rename from aiosnow/models/_base/schema/fields/datetime.py rename to aiosnow/models/_schema/fields/datetime.py diff --git a/aiosnow/models/_base/schema/fields/integer.py b/aiosnow/models/_schema/fields/integer.py similarity index 100% rename from aiosnow/models/_base/schema/fields/integer.py rename to aiosnow/models/_schema/fields/integer.py diff --git a/aiosnow/models/_base/schema/fields/mapped.py b/aiosnow/models/_schema/fields/mapped.py similarity index 100% rename from aiosnow/models/_base/schema/fields/mapped.py rename to aiosnow/models/_schema/fields/mapped.py diff --git a/aiosnow/models/_base/schema/fields/string.py b/aiosnow/models/_schema/fields/string.py similarity index 100% rename from aiosnow/models/_base/schema/fields/string.py rename to aiosnow/models/_schema/fields/string.py diff --git a/aiosnow/models/_base/schema/helpers/__init__.py b/aiosnow/models/_schema/helpers/__init__.py similarity index 100% rename from aiosnow/models/_base/schema/helpers/__init__.py rename to aiosnow/models/_schema/helpers/__init__.py diff --git a/aiosnow/models/_base/schema/helpers/pluck.py b/aiosnow/models/_schema/helpers/pluck.py similarity index 100% rename from aiosnow/models/_base/schema/helpers/pluck.py rename to aiosnow/models/_schema/helpers/pluck.py diff --git a/aiosnow/models/_base/schema/nested.py b/aiosnow/models/_schema/nested.py similarity index 100% rename from aiosnow/models/_base/schema/nested.py rename to aiosnow/models/_schema/nested.py diff --git a/aiosnow/models/_base/schema/schema.py b/aiosnow/models/_schema/schema.py similarity index 100% rename from aiosnow/models/_base/schema/schema.py rename to aiosnow/models/_schema/schema.py diff --git a/aiosnow/models/attachment/model.py b/aiosnow/models/attachment/model.py index 892084b..0e4b487 100644 --- a/aiosnow/models/attachment/model.py +++ b/aiosnow/models/attachment/model.py @@ -9,7 +9,8 @@ from .file import FileHandler, FileReader, FileWriter -from .._base import fields, BaseTableModel +from .._base import BaseTableModel +from .._schema import fields class AttachmentModel(BaseTableModel): diff --git a/tests/conftest.py b/tests/conftest.py index 2ba8d63..777ebc2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,7 +3,7 @@ import pytest from aiohttp import web -from aiosnow import fields, Client +from aiosnow import Client, fields from aiosnow.request.response import Response