aboutsummaryrefslogtreecommitdiff
path: root/mu4web/user/__init__.py
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-05-02 03:00:59 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-05-02 03:00:59 +0200
commitd17967eea2e42466103347257002451f17b5d5e8 (patch)
treed299b451ade590ab3cbf90c703c5914cad2fef4e /mu4web/user/__init__.py
parentHopefully fix installation issues. (diff)
downloadmu4web-d17967eea2e42466103347257002451f17b5d5e8.tar.gz
mu4web-d17967eea2e42466103347257002451f17b5d5e8.tar.xz
Configure linters.
Introduce flake8 and mypy for better error checking. Fix all errors and warnings emitted by those. Also fix type error with `url_for`.
Diffstat (limited to 'mu4web/user/__init__.py')
-rw-r--r--mu4web/user/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mu4web/user/__init__.py b/mu4web/user/__init__.py
index 1ecc49f..bb14f67 100644
--- a/mu4web/user/__init__.py
+++ b/mu4web/user/__init__.py
@@ -3,16 +3,16 @@ class User:
self._username = username
self._authenticated = False
- def is_authenticated(self):
+ def is_authenticated(self) -> bool:
return self._authenticated
- def is_active(self):
+ def is_active(self) -> bool:
return True
- def is_anonymous(self):
+ def is_anonymous(self) -> bool:
return False
- def get_id(self):
+ def get_id(self) -> str:
return self._username
def validate(self, _: str) -> bool: