mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-15 19:46:19 +01:00
Merge branch 'typehint-object-managers' into 'master'
Typehint object managers See merge request allianceauth/allianceauth!1713
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import logging
|
||||
from typing import Optional
|
||||
from typing import ClassVar, Optional
|
||||
|
||||
from requests.exceptions import HTTPError
|
||||
|
||||
@@ -59,7 +59,7 @@ class DiscordUser(models.Model):
|
||||
help_text='Date & time this service account was activated'
|
||||
)
|
||||
|
||||
objects = DiscordUserManager()
|
||||
objects: ClassVar[DiscordUserManager] = DiscordUserManager()
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import random
|
||||
import string
|
||||
from typing import ClassVar
|
||||
from passlib.hash import bcrypt_sha256
|
||||
|
||||
from django.db import models
|
||||
@@ -116,7 +117,7 @@ class MumbleUser(AbstractServiceModel):
|
||||
help_text="Timestamp of the users Last Disconnection to Mumble"
|
||||
)
|
||||
|
||||
objects = MumbleManager()
|
||||
objects: ClassVar[MumbleManager] = MumbleManager()
|
||||
|
||||
def __str__(self):
|
||||
return self.username
|
||||
|
||||
Reference in New Issue
Block a user