Skip to content

Commit

Permalink
Updated Dict typing
Browse files Browse the repository at this point in the history
  • Loading branch information
Edbo849 committed Sep 23, 2024
1 parent 8c5d068 commit 8cee724
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion esgf-consumer/esgf_consumer/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async def hard_delete_item(

async def partial_update_item(
collection_id: str,
item: dict,
item: Dict[str, Any],
item_id: str,
settings: Settings,
client: httpx.AsyncClient,
Expand Down
2 changes: 1 addition & 1 deletion esgf-generator/esgf_generator/cli.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
import random
import time
from typing import Literal
from typing import Dict, Literal

import click
import httpx
Expand Down
8 changes: 6 additions & 2 deletions esgf-transaction-api/esgf_transaction_api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ async def revoke_item_hard(collection_id: str, item_id: str) -> None:
await alternate_message(event)


async def partial_update_item(collection_id: str, item_id: str, item: dict) -> None:
async def partial_update_item(
collection_id: str, item_id: str, item: Dict[str, Any]
) -> None:
payload = PartialUpdatePayload(
method="PATCH", collection_id=collection_id, item=item, item_id=item_id
)
Expand Down Expand Up @@ -205,7 +207,9 @@ async def delete_item_hard(item_id: str, collection_id: str) -> None:


@app.patch("/{collection_id}/items/{item_id}")
async def partial_update(item_id: str, collection_id: str, item: dict) -> None:
async def partial_update(
item_id: str, collection_id: str, item: Dict[str, Any]
) -> None:
"""Add Update message to kafka event stream.
Args:
Expand Down

0 comments on commit 8cee724

Please sign in to comment.