diff --git a/server/planning/__init__.py b/server/planning/__init__.py index 6e254ca3f..6021bc3bc 100644 --- a/server/planning/__init__.py +++ b/server/planning/__init__.py @@ -11,7 +11,6 @@ """Superdesk Planning Plugin.""" import logging -from server.planning.commands.delete_spiked_items import delete_spiked_items_handler import superdesk from quart_babel import lazy_gettext diff --git a/server/planning/events/service.py b/server/planning/events/service.py index 9982971e4..5a5e5941f 100644 --- a/server/planning/events/service.py +++ b/server/planning/events/service.py @@ -17,7 +17,7 @@ async def get_expired_items( Where end date is in the past """ - query = { + query: dict[str, Any] = { "query": {"bool": {"must_not": [{"term": {"expired": True}}]}}, "filter": {"range": {"dates.end": {"lte": date_to_str(expiry_datetime)}}}, "sort": [{"dates.start": "asc"}], diff --git a/server/planning/planning/service.py b/server/planning/planning/service.py index f0af4b6ee..997f4b97d 100644 --- a/server/planning/planning/service.py +++ b/server/planning/planning/service.py @@ -24,7 +24,7 @@ async def get_expired_items( } } range_filter = {"range": {"planning_date": {"gt": date_to_str(expiry_datetime)}}} - query = { + query: dict[str, Any] = { "query": { "bool": { "must_not": [