You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/10/03 05:26:42 UTC

[GitHub] [airflow] mlgruby opened a new pull request #11250: Strict type check for all hooks in amazon

mlgruby opened a new pull request #11250:
URL: https://github.com/apache/airflow/pull/11250


   Since the code base for Amazon is a little bit I took an approach of going through one module at a time. 
   
   @kaxil @mik-laj let me know if this approach is good or otherwise I will make this PR as WIP and include other modules as well. 
   
   46.375552 amazon  ============> from 42 to 46 (This just includes hooks) 
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] mlgruby commented on a change in pull request #11250: Strict type check for all hooks in amazon

Posted by GitBox <gi...@apache.org>.
mlgruby commented on a change in pull request #11250:
URL: https://github.com/apache/airflow/pull/11250#discussion_r499138772



##########
File path: airflow/providers/amazon/aws/hooks/sns.py
##########
@@ -52,7 +53,7 @@ class AwsSnsHook(AwsBaseHook):
     def __init__(self, *args, **kwargs):
         super().__init__(client_type='sns', *args, **kwargs)
 
-    def publish_to_target(self, target_arn, message, subject=None, message_attributes=None):
+    def publish_to_target(self, target_arn, message, subject=None, message_attributes: Optional[dict] = None):

Review comment:
       Sure, I might have missed it. I will add those! 




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on pull request #11250: Strict type check for all hooks in amazon

Posted by GitBox <gi...@apache.org>.
kaxil commented on pull request #11250:
URL: https://github.com/apache/airflow/pull/11250#issuecomment-704094224


   Good work again here @mlgruby 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] mik-laj merged pull request #11250: Strict type check for all hooks in amazon

Posted by GitBox <gi...@apache.org>.
mik-laj merged pull request #11250:
URL: https://github.com/apache/airflow/pull/11250


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on a change in pull request #11250: Strict type check for all hooks in amazon

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #11250:
URL: https://github.com/apache/airflow/pull/11250#discussion_r499130054



##########
File path: airflow/providers/amazon/aws/hooks/sns.py
##########
@@ -52,7 +53,7 @@ class AwsSnsHook(AwsBaseHook):
     def __init__(self, *args, **kwargs):
         super().__init__(client_type='sns', *args, **kwargs)
 
-    def publish_to_target(self, target_arn, message, subject=None, message_attributes=None):
+    def publish_to_target(self, target_arn, message, subject=None, message_attributes: Optional[dict] = None):

Review comment:
       Can you add TypeHints to `target_arn`, `message` and `subject` too please




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on pull request #11250: Strict type check for all hooks in amazon

Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #11250:
URL: https://github.com/apache/airflow/pull/11250#issuecomment-704174552


   I created issues about `boto3-stubs` package: https://github.com/apache/airflow/issues/11297


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] mik-laj edited a comment on pull request #11250: Strict type check for all hooks in amazon

Posted by GitBox <gi...@apache.org>.
mik-laj edited a comment on pull request #11250:
URL: https://github.com/apache/airflow/pull/11250#issuecomment-704174552


   I created issue about `boto3-stubs` package: https://github.com/apache/airflow/issues/11297


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on pull request #11250: Strict type check for all hooks in amazon

Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #11250:
URL: https://github.com/apache/airflow/pull/11250#issuecomment-704090888


   @kaxil  We can add additional type hint later.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on pull request #11250: Strict type check for all hooks in amazon

Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #11250:
URL: https://github.com/apache/airflow/pull/11250#issuecomment-703093086


   Should we use https://pypi.org/project/boto3-stubs/ or other similar packages?
   
   CC: @coopergillan 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on pull request #11250: Strict type check for all hooks in amazon

Posted by GitBox <gi...@apache.org>.
kaxil commented on pull request #11250:
URL: https://github.com/apache/airflow/pull/11250#issuecomment-704077252


   > Should we use https://pypi.org/project/boto3-stubs/ or other similar packages?
   > 
   > CC: @coopergillan
   
   Any comments here @coopergillan ?


----------------------------------------------------------------
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:
users@infra.apache.org