mypy: Use Python 3 type syntax in zerver/forms.py

This commit is contained in:
greysome 2017-12-14 17:31:31 +08:00 committed by showell
parent 06b462ba19
commit bbe2d91d31
1 changed files with 10 additions and 11 deletions

View File

@ -175,17 +175,16 @@ class LoggingSetPasswordForm(SetPasswordForm):
class ZulipPasswordResetForm(PasswordResetForm): class ZulipPasswordResetForm(PasswordResetForm):
def save(self, def save(self,
domain_override=None, # type: Optional[bool] domain_override: Optional[bool]=None,
subject_template_name='registration/password_reset_subject.txt', # type: Text subject_template_name: Text='registration/password_reset_subject.txt',
email_template_name='registration/password_reset_email.html', # type: Text email_template_name: Text='registration/password_reset_email.html',
use_https=False, # type: bool use_https: bool=False,
token_generator=default_token_generator, # type: PasswordResetTokenGenerator token_generator: PasswordResetTokenGenerator=default_token_generator,
from_email=None, # type: Optional[Text] from_email: Optional[Text]=None,
request=None, # type: HttpRequest request: HttpRequest=None,
html_email_template_name=None, # type: Optional[Text] html_email_template_name: Optional[Text]=None,
extra_email_context=None # type: Optional[Dict[str, Any]] extra_email_context: Optional[Dict[str, Any]]=None
): ) -> None:
# type: (...) -> None
""" """
If the email address has an account in the target realm, If the email address has an account in the target realm,
generates a one-use only link for resetting password and sends generates a one-use only link for resetting password and sends