summaryrefslogtreecommitdiffstats
path: root/accounts/models.py
diff options
context:
space:
mode:
authorJonah BrĂ¼chert <jbb@kaidan.im>2024-03-29 01:57:13 +0100
committerJonah BrĂ¼chert <jbb@kaidan.im>2024-03-29 02:14:11 +0100
commit41551f9ff74c692b3db7818364a9b0966e5a08be (patch)
treef68c2c5a239ca172b31e91a944584274eda383f9 /accounts/models.py
parent7f9ceaa1601b57338fadd93c591d8f837afe7d1f (diff)
downloadweb-41551f9ff74c692b3db7818364a9b0966e5a08be.tar.gz
web-41551f9ff74c692b3db7818364a9b0966e5a08be.tar.bz2
web-41551f9ff74c692b3db7818364a9b0966e5a08be.zip
Enforce types in function calls
Diffstat (limited to 'accounts/models.py')
-rw-r--r--accounts/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/accounts/models.py b/accounts/models.py
index fe6c500..c897815 100644
--- a/accounts/models.py
+++ b/accounts/models.py
@@ -68,7 +68,7 @@ class Account(UserMixin):
else:
self.new_password_services[service] = (old_password, new_password)
- def _set_attribute(self, key, value):
+ def _set_attribute(self, key: str, value: Any) -> None:
self.attributes[key] = value
def change_email(self, new_mail: str):
@@ -85,7 +85,7 @@ class Account(UserMixin):
raise AttributeError("'%s' object has no attribute '%s'" %
(self.__class__.__name__, name))
- def __setattr__(self, name, value):
+ def __setattr__(self, name: str, value: Any):
if self._ready and name not in self.__dict__:
self._set_attribute(name, value)
else: