SalAlba commented on a change in pull request #10864:
URL: https://github.com/apache/airflow/pull/10864#discussion_r487875791
##########
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:
This Airflow Connection come from this class I assume `from
airflow.models import Connection`
so can we make this change :
```diff
from airflow.models import Connection
- self.connection = kwargs.pop("connection", None)
+ self.connection: Optional[Connection] = kwargs.pop("connection", None)
```
----------------------------------------------------------------
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]