From 6d65d60c085278bfdf2da391e2b0a468b21a3581 Mon Sep 17 00:00:00 2001 From: Sultan Iman Date: Tue, 26 Mar 2024 16:35:36 +0100 Subject: [PATCH] Specify precise types --- dlt/common/storages/configuration.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlt/common/storages/configuration.py b/dlt/common/storages/configuration.py index 2c8be3d755..c3faa3b31d 100644 --- a/dlt/common/storages/configuration.py +++ b/dlt/common/storages/configuration.py @@ -19,13 +19,13 @@ from dlt.common.schema import Schema from dlt.common.utils import digest128 -from pendulum import datetime +from pendulum.datetime import DateTime TSchemaFileFormat = Literal["json", "yaml"] SchemaFileExtensions = get_args(TSchemaFileFormat) -TDatetimeFormatter: TypeAlias = Callable[[datetime], str] -TDatetimeFormat: TypeAlias = Union[str, TDatetimeFormatter] -TLayoutParamCallback: TypeAlias = Callable[[Schema, datetime], str] +TDatetimeFormatterCallback: TypeAlias = Callable[[DateTime], str] +TDatetimeFormat: TypeAlias = Union[str, TDatetimeFormatterCallback] +TLayoutParamCallback: TypeAlias = Callable[[Schema, DateTime], str] @configspec