From a37401ca3f48a3f8474c5221a219849e3396c0ce Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Tue, 1 Oct 2024 17:11:05 +0200 Subject: [PATCH] remove unused --- stac_fastapi/pgstac/app.py | 5 +---- stac_fastapi/pgstac/core.py | 4 +--- tests/api/test_api.py | 5 +---- tests/conftest.py | 5 +---- 4 files changed, 4 insertions(+), 15 deletions(-) diff --git a/stac_fastapi/pgstac/app.py b/stac_fastapi/pgstac/app.py index 5dd37b1..9946c08 100644 --- a/stac_fastapi/pgstac/app.py +++ b/stac_fastapi/pgstac/app.py @@ -88,10 +88,7 @@ extensions=extensions + [collection_search_extension] if collection_search_extension else extensions, - client=CoreCrudClient( - post_request_model=post_request_model, # type: ignore - collections_get_request_model=collections_get_request_model, # type: ignore - ), + client=CoreCrudClient(post_request_model=post_request_model), # type: ignore response_class=ORJSONResponse, items_get_request_model=items_get_request_model, search_get_request_model=get_request_model, diff --git a/stac_fastapi/pgstac/core.py b/stac_fastapi/pgstac/core.py index a9d1ba1..e7dcab2 100644 --- a/stac_fastapi/pgstac/core.py +++ b/stac_fastapi/pgstac/core.py @@ -14,7 +14,7 @@ from pygeofilter.backends.cql2_json import to_cql2 from pygeofilter.parsers.cql2_text import parse as parse_cql2_text from pypgstac.hydration import hydrate -from stac_fastapi.api.models import APIRequest, EmptyRequest, JSONResponse +from stac_fastapi.api.models import JSONResponse from stac_fastapi.types.core import AsyncBaseCoreClient, Relations from stac_fastapi.types.errors import InvalidQueryParameter, NotFoundError from stac_fastapi.types.requests import get_base_url @@ -39,8 +39,6 @@ class CoreCrudClient(AsyncBaseCoreClient): """Client for core endpoints defined by stac.""" - collections_get_request_model: APIRequest = attr.ib(default=EmptyRequest) - async def all_collections( # noqa: C901 self, request: Request, diff --git a/tests/api/test_api.py b/tests/api/test_api.py index 33335c1..b135dce 100644 --- a/tests/api/test_api.py +++ b/tests/api/test_api.py @@ -736,10 +736,7 @@ async def get_collection( ) api = StacApi( - client=Client( - post_request_model=post_request_model, - collections_get_request_model=collection_search_extension.GET, - ), + client=Client(post_request_model=post_request_model), settings=settings, extensions=extensions, search_post_request_model=post_request_model, diff --git a/tests/conftest.py b/tests/conftest.py index 17bfdf6..fc63514 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -155,10 +155,7 @@ def api_client(request, database): api = StacApi( settings=api_settings, extensions=extensions + [collection_search_extension], - client=CoreCrudClient( - post_request_model=search_post_request_model, - collections_get_request_model=collections_get_request_model, - ), + client=CoreCrudClient(post_request_model=search_post_request_model), items_get_request_model=items_get_request_model, search_get_request_model=search_get_request_model, search_post_request_model=search_post_request_model,