diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-08-07 15:25:12 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-08-07 15:25:12 +0200 |
commit | 08f891835557c2e7f92fb350e0dbe511b334faec (patch) | |
tree | e5210dbb98fd763a8f84b78f5d0abb1e2e3df50c /mu4web | |
parent | Add tests. (diff) | |
download | mu4web-08f891835557c2e7f92fb350e0dbe511b334faec.tar.gz mu4web-08f891835557c2e7f92fb350e0dbe511b334faec.tar.xz |
Fix some linter warnings.
Diffstat (limited to 'mu4web')
-rw-r--r-- | mu4web/components.py | 2 | ||||
-rw-r--r-- | mu4web/user/pam.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/mu4web/components.py b/mu4web/components.py index 07ab400..a73ea2f 100644 --- a/mu4web/components.py +++ b/mu4web/components.py @@ -132,7 +132,7 @@ def flashed_messages(messages: list[str] | list[tuple[str, str]]) -> HTML: """ if not messages: return [] - if type(messages[0]) == tuple: + if isinstance(messages[0], tuple): messages = cast(list[tuple[str, str]], messages) return ('ul', {'class': 'flashes'}, *[('li', msg) for (_, msg) in messages]) diff --git a/mu4web/user/pam.py b/mu4web/user/pam.py index c641ff8..3886297 100644 --- a/mu4web/user/pam.py +++ b/mu4web/user/pam.py @@ -9,5 +9,5 @@ class PamUser(User): def validate(self, password: str) -> bool: # noqa: 201 ret = pam.authenticate(self._username, password) - assert type(ret) == bool + assert isinstance(ret, bool) return ret |