Skip to content

Commit

Permalink
fix: correct TypeError message
Browse files Browse the repository at this point in the history
  • Loading branch information
jaidisido committed May 1, 2024
1 parent eb9386f commit 28d7416
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions awswrangler/_sql_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')}'"

Expand Down Expand Up @@ -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()}'"

Expand Down

0 comments on commit 28d7416

Please sign in to comment.