ashb commented on a change in pull request #6315: [AIRFLOW-5640] fix
get_email_address_list types
URL: https://github.com/apache/airflow/pull/6315#discussion_r334924993
##########
File path: airflow/utils/email.py
##########
@@ -120,13 +122,22 @@ def send_MIME_email(e_from, e_to, mime_msg,
dryrun=False):
s.quit()
-def get_email_address_list(address_string):
- if isinstance(address_string, str):
- if ',' in address_string:
- address_string = [address.strip() for address in
address_string.split(',')]
- elif ';' in address_string:
- address_string = [address.strip() for address in
address_string.split(';')]
- else:
- address_string = [address_string]
+def get_email_address_list(addresses: Union[str, Iterable[str]]) -> List[str]:
Review comment:
This fails with.
> TypeError: 'ABCMeta' object is not subscriptable
I think you want typing.Iterable instead.
----------------------------------------------------------------
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]
With regards,
Apache Git Services