diff --git a/tests/test_serialization.py b/tests/test_serialization.py index 67525777..ed1a835b 100644 --- a/tests/test_serialization.py +++ b/tests/test_serialization.py @@ -15,7 +15,7 @@ Stats, WebPage, ) -from web_poet.page_inputs.annotated import AnnotatedInstance +from web_poet.annotated import AnnotatedInstance from web_poet.page_inputs.url import _Url from web_poet.serialization import ( SerializedDataFileStorage, diff --git a/tests/test_testing.py b/tests/test_testing.py index f7289a6a..2e8a2b44 100644 --- a/tests/test_testing.py +++ b/tests/test_testing.py @@ -14,8 +14,8 @@ from zyte_common_items import Item, Metadata, Product from web_poet import HttpClient, HttpRequest, HttpResponse, WebPage, field +from web_poet.annotated import AnnotatedInstance from web_poet.exceptions import HttpRequestError, HttpResponseError, Retry, UseFallback -from web_poet.page_inputs import AnnotatedInstance from web_poet.page_inputs.client import _SavedResponseData from web_poet.testing import Fixture from web_poet.testing.__main__ import main as cli_main diff --git a/web_poet/__init__.py b/web_poet/__init__.py index 76933fab..88c05e7a 100644 --- a/web_poet/__init__.py +++ b/web_poet/__init__.py @@ -1,6 +1,5 @@ from .fields import field, item_from_fields, item_from_fields_sync from .page_inputs import ( - AnnotatedInstance, AnyResponse, BrowserHtml, BrowserResponse, diff --git a/web_poet/page_inputs/annotated.py b/web_poet/annotated.py similarity index 100% rename from web_poet/page_inputs/annotated.py rename to web_poet/annotated.py diff --git a/web_poet/page_inputs/__init__.py b/web_poet/page_inputs/__init__.py index 270d2836..9c781e29 100644 --- a/web_poet/page_inputs/__init__.py +++ b/web_poet/page_inputs/__init__.py @@ -1,4 +1,3 @@ -from .annotated import AnnotatedInstance from .browser import BrowserHtml, BrowserResponse from .client import HttpClient from .http import ( diff --git a/web_poet/serialization/api.py b/web_poet/serialization/api.py index afdc6c42..cd36c54b 100644 --- a/web_poet/serialization/api.py +++ b/web_poet/serialization/api.py @@ -8,7 +8,8 @@ from andi.typeutils import strip_annotated import web_poet -from web_poet import AnnotatedInstance, Injectable +from web_poet import Injectable +from web_poet.annotated import AnnotatedInstance from web_poet.pages import is_injectable from web_poet.utils import get_fq_class_name diff --git a/web_poet/serialization/functions.py b/web_poet/serialization/functions.py index 69a54400..9490084b 100644 --- a/web_poet/serialization/functions.py +++ b/web_poet/serialization/functions.py @@ -2,7 +2,6 @@ from typing import Any, Dict, List, Optional, Type, cast from .. import ( - AnnotatedInstance, HttpClient, HttpRequest, HttpRequestBody, @@ -11,6 +10,7 @@ PageParams, Stats, ) +from ..annotated import AnnotatedInstance from ..exceptions import HttpError from ..page_inputs.client import _SavedResponseData from ..page_inputs.url import _Url