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 2022/01/04 16:24:45 UTC

[GitHub] [airflow] subkanthi commented on a change in pull request #20651: Fix mypy in providers/grpc and providers/imap

subkanthi commented on a change in pull request #20651:
URL: https://github.com/apache/airflow/pull/20651#discussion_r778214739



##########
File path: airflow/providers/imap/hooks/imap.py
##########
@@ -71,7 +71,7 @@ def get_conn(self) -> 'ImapHook':
         """
         if not self.mail_client:
             conn = self.get_connection(self.imap_conn_id)
-            self.mail_client = imaplib.IMAP4_SSL(conn.host, conn.port or imaplib.IMAP4_SSL_PORT)
+            self.mail_client = imaplib.IMAP4_SSL(conn.host, conn.port or imaplib.IMAP4_SSL.port)

Review comment:
       I was going off this, the default value for port in the constructor for IMAP4_SSL 
   ```
   
       class IMAP4_SSL(IMAP4):
   
           """IMAP4 client class over SSL connection
   
           Instantiate with: IMAP4_SSL([host[, port[, keyfile[, certfile[, ssl_context]]]]])
   
                   host - host's name (default: localhost);
                   port - port number (default: standard IMAP4 SSL port);
                   keyfile - PEM formatted file that contains your private key (default: None);
                   certfile - PEM formatted certificate chain file (default: None);
                   ssl_context - a SSLContext object that contains your certificate chain
                                 and private key (default: None)
                   Note: if ssl_context is provided, then parameters keyfile or
                   certfile should not be set otherwise ValueError is raised.
   
           for more documentation see the docstring of the parent class IMAP4.
           """
   
   
           def __init__(self, host='', port=IMAP4_SSL_PORT, keyfile=None,
                        certfile=None, ssl_context=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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org