feluelle commented on a change in pull request #7541: [AIRFLOW-6822] AWS hooks 
should cache boto3 client
URL: https://github.com/apache/airflow/pull/7541#discussion_r385087185
 
 

 ##########
 File path: airflow/providers/amazon/aws/hooks/base_aws.py
 ##########
 @@ -47,11 +48,29 @@ class AwsBaseHook(BaseHook):
     :param verify: Whether or not to verify SSL certificates.
         
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html
     :type verify: str or bool
+    :param str region_name: AWS Region name to use. If this is None then the 
default boto3
+        behaviour is used.
+    :param str client_type: boto3 client_type used when creating 
boto3.client(). For
+        example, 's3', 'emr', etc. Provided by specific hooks for these 
clients which
+        subclass AwsBaseHook.
+    :param str resource_type: boto3 resource_type used when creating 
boto3.resource(). For
+        example, 's3'. Provided by specific hooks for these resources which
+        subclass AwsBaseHook.
 
 Review comment:
   Can you use `:param` + `:type` ?
   
   Also the type is `Optional[str]` not `str` because it allows a string to be 
None. 
   You can also define the types directly next to the argument like this: 
`region_name: Optional[str] = None`. You only need to import `typing`. It is an 
official PEP https://www.python.org/dev/peps/pep-0484/ in Python >=3.5

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to