From 8759b755d2d1325c2eb27d7f74ec2fd8ab54ea98 Mon Sep 17 00:00:00 2001 From: jaidisido Date: Wed, 1 May 2024 21:05:49 +0100 Subject: [PATCH] fix: correct TypeError message (#2796) --- awswrangler/_sql_formatter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awswrangler/_sql_formatter.py b/awswrangler/_sql_formatter.py index 855b59386..e38b9df96 100644 --- a/awswrangler/_sql_formatter.py +++ b/awswrangler/_sql_formatter.py @@ -40,7 +40,7 @@ def format_decimal(self, value: decimal.Decimal) -> str: def format_timestamp(self, value: datetime.datetime) -> str: if value.tzinfo is not None: - raise TypeError(f"Supports only timezone aware datatype, got {value}.") + raise TypeError(f"Supports only timezone naive datatype, got {value}.") return f"TIMESTAMP '{value.isoformat(sep=' ', timespec='milliseconds')}'" @@ -132,7 +132,7 @@ def format_decimal(self, value: decimal.Decimal) -> str: def format_timestamp(self, value: datetime.datetime) -> str: if value.tzinfo is not None: - raise TypeError(f"Supports only timezone aware datatype, got {value}.") + raise TypeError(f"Supports only timezone naive datatype, got {value}.") return f"'{value.isoformat()}'"