john-bodley commented on a change in pull request #9586: [mypy] Enforcing
typing for a number of modules
URL:
https://github.com/apache/incubator-superset/pull/9586#discussion_r410971812
##########
File path: superset/utils/core.py
##########
@@ -687,25 +687,25 @@ def notify_user_about_perm_udate(granter, user, role,
datasource, tpl_name, conf
def send_email_smtp(
- to,
- subject,
- html_content,
- config,
- files=None,
- data=None,
- images=None,
- dryrun=False,
- cc=None,
- bcc=None,
- mime_subtype="mixed",
-):
+ to: str,
+ subject: str,
+ html_content: str,
+ config: Dict[str, Any],
+ files: Optional[List[str]] = None,
+ data: Optional[Dict[str, str]] = None,
+ images: Optional[Dict[str, str]] = None,
+ dryrun: bool = False,
+ cc: Optional[str] = None,
+ bcc: Optional[str] = None,
+ mime_subtype: str = "mixed",
+) -> None:
"""
Send an email with html content, eg:
send_email_smtp(
'[email protected]', 'foo', '<b>Foo</b> bar',['/dev/null'], dryrun=True)
"""
smtp_mail_from = config["SMTP_MAIL_FROM"]
- to = get_email_address_list(to)
+ to = get_email_address_list(to) # type: ignore
Review comment:
Overriding of variable names of different types should be avoided in the
future.
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]