turbaszek commented on a change in pull request #10864:
URL: https://github.com/apache/airflow/pull/10864#discussion_r487864037



##########
File path: airflow/providers/postgres/hooks/postgres.py
##########
@@ -53,13 +58,13 @@ class PostgresHook(DbApiHook):
     default_conn_name = 'postgres_default'
     supports_autocommit = True
 
-    def __init__(self, *args, **kwargs):
+    def __init__(self, *args, **kwargs) -> None:
         super().__init__(*args, **kwargs)
         self.schema = kwargs.pop("schema", None)
         self.connection = kwargs.pop("connection", None)
         self.conn = None

Review comment:
       Taking a look at the hook logic it seems that:
   - `self.connection` is an Airflow `Connection` class so it provides 
information on what parameters should be used for establishing postgres 
connection
   - `self.conn` is direct connection to postgres: 
   
https://github.com/apache/airflow/blob/12a652f5344c7f03c3d780556ca1829b235fdb2d/airflow/providers/postgres/hooks/postgres.py#L104




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


Reply via email to