From 2b8629b4764bfd5b9b9ca34986ccfbf4a4ba940f Mon Sep 17 00:00:00 2001 From: Lubomir Dolezal Date: Tue, 16 Jul 2024 11:02:58 +0200 Subject: [PATCH] fix CI on Python 3.10 --- ruff.toml | 2 +- src/eodash_catalog/endpoints.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ruff.toml b/ruff.toml index e5d3b81..223c035 100644 --- a/ruff.toml +++ b/ruff.toml @@ -5,4 +5,4 @@ target-version = "py312" [lint] select = ["E", "F", "UP", "B", "SIM", "I", "W", "C90", "ASYNC", "A", "C4", "PERF", "RUF"] -ignore = ["B019", "C901"] +ignore = ["B019", "C901", "UP017"] diff --git a/src/eodash_catalog/endpoints.py b/src/eodash_catalog/endpoints.py index cd997ee..504c00e 100644 --- a/src/eodash_catalog/endpoints.py +++ b/src/eodash_catalog/endpoints.py @@ -4,7 +4,7 @@ import sys import uuid from collections.abc import Callable -from datetime import UTC, datetime, timedelta +from datetime import datetime, timedelta, timezone from itertools import groupby from operator import itemgetter @@ -513,9 +513,9 @@ def handle_WMS_endpoint( if query := endpoint_config.get("Query"): datetime_query = [times[0], times[-1]] if start := query.get("Start"): - datetime_query[0] = parser.isoparse(start).replace(tzinfo=UTC) + datetime_query[0] = parser.isoparse(start).replace(tzinfo=timezone.utc) if end := query.get("End"): - datetime_query[1] = parser.isoparse(end).replace(tzinfo=UTC) + datetime_query[1] = parser.isoparse(end).replace(tzinfo=timezone.utc) # filter times based on query Start/End times = [ datetime_str