uranusjr commented on code in PR #25544:
URL: https://github.com/apache/airflow/pull/25544#discussion_r938419228


##########
airflow/providers/amazon/aws/hooks/s3.py:
##########
@@ -128,12 +128,12 @@ def __init__(
         kwargs['client_type'] = 's3'
         kwargs['aws_conn_id'] = aws_conn_id
 
-        if extra_args and not isinstance(extra_args, dict):
-            raise ValueError(f"transfer_config_args '{extra_args!r}' must be 
of type {dict}")
+        if transfer_config_args and not isinstance(transfer_config_args, dict):
+            raise TypeError(f"transfer_config_args expected dict, got 
{type(transfer_config_args)}.")
         self.transfer_config = TransferConfig(**transfer_config_args or {})
 
         if extra_args and not isinstance(extra_args, dict):
-            raise ValueError(f"extra_args '{extra_args!r}' must be of type 
{dict}")
+            raise TypeError(f"extra_args expected dict, got 
{type(extra_args)}.")

Review Comment:
   ```suggestion
               raise TypeError(f"extra_args expected dict, got 
{type(extra_args).__name__}.")
   ```
   
   would make the output cleaner



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to