Browse Source
Remove unused ignore comments.
merge-requests/162/head
Bauke
4 months ago
No known key found for this signature in database
GPG Key ID: C1C0F29952BCF558
2 changed files with
3 additions and
3 deletions
-
tildes/scripts/initialize_db.py
-
tildes/tildes/models/user/user.py
|
|
|
@ -8,7 +8,7 @@ import os |
|
|
|
import subprocess |
|
|
|
from typing import Optional |
|
|
|
|
|
|
|
from alembic import command # type: ignore[attr-defined] |
|
|
|
from alembic import command |
|
|
|
from alembic.config import Config |
|
|
|
from sqlalchemy.engine import Connectable, Engine |
|
|
|
|
|
|
|
|
|
|
|
@ -177,7 +177,7 @@ class User(DatabaseModel): |
|
|
|
def __init__(self, username: str, password: str): |
|
|
|
"""Create a new user account.""" |
|
|
|
self.username = username |
|
|
|
self.password = password # type: ignore |
|
|
|
self.password = password |
|
|
|
|
|
|
|
def __acl__(self) -> AclType: |
|
|
|
"""Pyramid security ACL.""" |
|
|
|
@ -266,7 +266,7 @@ class User(DatabaseModel): |
|
|
|
raise ValueError("New password is the same as old password") |
|
|
|
|
|
|
|
# disable mypy on this line because it doesn't handle setters correctly |
|
|
|
self.password = new_password # type: ignore |
|
|
|
self.password = new_password |
|
|
|
|
|
|
|
def is_correct_two_factor_code(self, code: str) -> bool: |
|
|
|
"""Verify that a TOTP/backup code is correct.""" |
|
|
|
|