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/04/20 14:36:06 UTC

[GitHub] [airflow] zhongjiajie commented on issue #7903: Add property conn_name and connection to dbapi_hook

zhongjiajie commented on issue #7903:
URL: https://github.com/apache/airflow/pull/7903#issuecomment-616594810


   Two solutions CI passed, we have **two fix solutions** here, I prefer **the second one**, and it also the PR final status
   
   * Add `# type: ignore` in L76  in dbapi_hook to avoid `error: Signature of "get_connection" incompatible with supertype "BaseHook"`
   ```diff
   -    def get_connection(self, conn_id: Optional[str] = None) -> Connection:
   +    def get_connection(self, conn_id: Optional[str] = None) -> Connection:  # type: ignore
   ```
   * Using property function `connection` in dbapi_hook to get connection, which complete fix Signature error, and make dbapi_hook more easier.


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