From cbe7a56f50699e7a9ed0689a4ee5fe5adeac1494 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Tue, 1 Oct 2024 17:07:39 +0200 Subject: [PATCH] remove unused --- stac_fastapi/pgstac/app.py | 5 +---- stac_fastapi/pgstac/core.py | 4 +--- tests/conftest.py | 5 +---- 3 files changed, 3 insertions(+), 11 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/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,