Skip to content

Commit

Permalink
Fixing imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysrevans3 committed Aug 28, 2024
1 parent 36b7167 commit 0ecf3e5
Showing 1 changed file with 34 additions and 10 deletions.
44 changes: 34 additions & 10 deletions stac_fastapi/types/stac_fastapi/types/core.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Base clients."""

import abc
from typing import Any, Dict, List, Optional, Union
from typing import Any, Dict, List, Literal, Optional, Union
from urllib.parse import urljoin

import attr
Expand All @@ -17,15 +17,15 @@
from stac_fastapi.types import stac
from stac_fastapi.types.config import ApiSettings
from stac_fastapi.types.conformance import BASE_CONFORMANCE_CLASSES
from stac_fastapi.types.extension import ApiExtension
from stac_fastapi.types.requests import get_base_url
from stac_fastapi.types.rfc3339 import DateTimeType
from stac_fastapi.types.search import BaseSearchPostRequest
from stac_fastapi.types.transaction import (
from stac_fastapi.types.extension import (
ApiExtension,
PartialCollection,
PartialItem,
PatchOperation,
)
from stac_fastapi.types.requests import get_base_url
from stac_fastapi.types.rfc3339 import DateTimeType
from stac_fastapi.types.search import BaseSearchPostRequest

__all__ = [
"NumType",
Expand Down Expand Up @@ -92,7 +92,13 @@ def patch_item(
collection_id: str,
item_id: str,
patch: Union[PartialItem, List[PatchOperation]],
content_type: Optional[str] = "application/json",
content_type: Optional[
Literal[
"application/json-patch+json",
"application/merge-patch+json",
"application/json",
]
] = "application/json",
**kwargs,
) -> Optional[Union[stac.Item, Response]]:
"""Update an item from a collection.
Expand Down Expand Up @@ -233,7 +239,13 @@ def patch_collection(
self,
collection_id: str,
patch: Union[PartialCollection, List[PatchOperation]],
content_type: Optional[str] = "application/json",
content_type: Optional[
Literal[
"application/json-patch+json",
"application/merge-patch+json",
"application/json",
]
] = "application/json",
**kwargs,
) -> Optional[Union[stac.Collection, Response]]:
"""Update a collection.
Expand Down Expand Up @@ -371,7 +383,13 @@ async def patch_item(
collection_id: str,
item_id: str,
patch: Union[PartialItem, List[PatchOperation]],
content_type: Optional[str] = "application/json",
content_type: Optional[
Literal[
"application/json-patch+json",
"application/merge-patch+json",
"application/json",
]
] = "application/json",
**kwargs,
) -> Optional[Union[stac.Item, Response]]:
"""Update an item from a collection.
Expand Down Expand Up @@ -512,7 +530,13 @@ async def patch_collection(
self,
collection_id: str,
patch: Union[PartialCollection, List[PatchOperation]],
content_type: Optional[str] = "application/json",
content_type: Optional[
Literal[
"application/json-patch+json",
"application/merge-patch+json",
"application/json",
]
] = "application/json",
**kwargs,
) -> Optional[Union[stac.Collection, Response]]:
"""Update a collection.
Expand Down

0 comments on commit 0ecf3e5

Please sign in to comment.