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 2019/10/18 12:47:40 UTC

[GitHub] [airflow] simpleranchero commented on a change in pull request #6345: [AIRFLOW-5667] Improve type annotations in GCP

simpleranchero commented on a change in pull request #6345: [AIRFLOW-5667] Improve type annotations in GCP
URL: https://github.com/apache/airflow/pull/6345#discussion_r336472573
 
 

 ##########
 File path: airflow/gcp/hooks/cloud_sql.py
 ##########
 @@ -924,17 +924,17 @@ def _generate_connection_uri(self) -> str:
             quote_plus(self.password) if self.password else 'PASSWORD', 'XXXXXXXXXXXX'))
         return connection_uri
 
-    def _get_instance_socket_name(self):
-        return self.project_id + ":" + self.location + ":" + self.instance
+    def _get_instance_socket_name(self) -> str:
+        return self.project_id + ":" + self.location + ":" + self.instance  # type: ignore
 
-    def _get_sqlproxy_instance_specification(self):
+    def _get_sqlproxy_instance_specification(self) -> str:
         instance_specification = self._get_instance_socket_name()
         if self.sql_proxy_use_tcp:
             instance_specification += "=tcp:" + str(self.sql_proxy_tcp_port)
         return instance_specification
 
     @provide_session
-    def create_connection(self, session: Session = None):
+    def create_connection(self, session: Session = None) -> None:
 
 Review comment:
   Optional[Session]

----------------------------------------------------------------
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


With regards,
Apache Git Services