diff options
author | Jonathan de Jong <jonathan@automatia.nl> | 2021-04-05 15:10:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-05 09:10:18 -0400 |
commit | e2b8a90897e137fd118768a3bf35b70642916eb7 (patch) | |
tree | 60562fb54b2af8c61e940624f6821cbacf98a06c /synapse/handlers | |
parent | Fix version for bugbear (#9734) (diff) | |
download | synapse-e2b8a90897e137fd118768a3bf35b70642916eb7.tar.xz |
Update mypy configuration: `no_implicit_optional = True` (#9742)
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/account_validity.py | 7 | ||||
-rw-r--r-- | synapse/handlers/e2e_keys.py | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/synapse/handlers/account_validity.py b/synapse/handlers/account_validity.py index d781bb251d..bee1447c2e 100644 --- a/synapse/handlers/account_validity.py +++ b/synapse/handlers/account_validity.py @@ -18,7 +18,7 @@ import email.utils import logging from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, List, Optional from synapse.api.errors import StoreError, SynapseError from synapse.logging.context import make_deferred_yieldable @@ -241,7 +241,10 @@ class AccountValidityHandler: return True async def renew_account_for_user( - self, user_id: str, expiration_ts: int = None, email_sent: bool = False + self, + user_id: str, + expiration_ts: Optional[int] = None, + email_sent: bool = False, ) -> int: """Renews the account attached to a given user by pushing back the expiration date by the current validity period in the server's diff --git a/synapse/handlers/e2e_keys.py b/synapse/handlers/e2e_keys.py index 2ad9b6d930..739653a3fa 100644 --- a/synapse/handlers/e2e_keys.py +++ b/synapse/handlers/e2e_keys.py @@ -1008,7 +1008,7 @@ class E2eKeysHandler: return signature_list, failures async def _get_e2e_cross_signing_verify_key( - self, user_id: str, key_type: str, from_user_id: str = None + self, user_id: str, key_type: str, from_user_id: Optional[str] = None ) -> Tuple[JsonDict, str, VerifyKey]: """Fetch locally or remotely query for a cross-signing public key. |