|
7 | 7 | import datetime |
8 | 8 | from collections.abc import Iterable |
9 | 9 | from threading import Lock |
10 | | -from typing import Any, Literal |
| 10 | +from typing import Any, Literal, override |
11 | 11 | from uuid import UUID |
12 | 12 |
|
13 | 13 | import click |
|
16 | 16 | from datacube.model import Dataset, Product, Range |
17 | 17 | from odc.geo import CRS, Geometry |
18 | 18 | from sqlalchemy import text |
19 | | -from typing_extensions import override |
20 | 19 |
|
21 | 20 | from datacube_ows.index.api import ( |
22 | 21 | AbortRun, |
@@ -63,7 +62,7 @@ def _check_perms(self, dc: Datacube, group: Literal["manage", "admin"]) -> None: |
63 | 62 | if get_driver_name(dc.index) == "psycopg": |
64 | 63 | from psycopg.errors import ProgrammingError |
65 | 64 | else: |
66 | | - from psycopg2.errors import ProgrammingError |
| 65 | + from psycopg2.errors import ProgrammingError # type:ignore[no-redef] |
67 | 66 | try: |
68 | 67 | with get_sqlconn(dc) as conn: |
69 | 68 | conn.execute(text(f"set role odc_{group}")) |
@@ -142,10 +141,7 @@ def normalise_to_dtr( |
142 | 141 | tmax = st + datetime.timedelta(seconds=1) |
143 | 142 | elif isinstance(t, datetime.date): |
144 | 143 | st = datetime.datetime( |
145 | | - unnorm.year, |
146 | | - unnorm.month, |
147 | | - unnorm.day, |
148 | | - tzinfo=datetime.timezone.utc, |
| 144 | + unnorm.year, unnorm.month, unnorm.day, tzinfo=datetime.UTC |
149 | 145 | ) |
150 | 146 | tmax = st + datetime.timedelta(days=1) |
151 | 147 | else: |
|
0 commit comments