mirror of https://github.com/zulip/zulip.git
default_settings: Weaken CUSTOM_AUTHENTICATION_WRAPPER_FUNCTION type.
Fixes an import cycle that breaks mypy inference with django-stubs: zproject.settings → zproject.configured_settings → zproject.default_settings → zerver.models.users → django.conf → zproject.settings (The Django settings system is really not an appropriate place to put functions.) Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
73116f78a5
commit
166c233b2a
|
@ -12,8 +12,6 @@ from .config import DEVELOPMENT, PRODUCTION, get_secret
|
|||
if TYPE_CHECKING:
|
||||
from django_auth_ldap.config import LDAPSearch
|
||||
|
||||
from zerver.models.users import UserProfile
|
||||
|
||||
if PRODUCTION: # nocoverage
|
||||
from .prod_settings import EXTERNAL_HOST, ZULIP_ADMINISTRATOR
|
||||
else:
|
||||
|
@ -634,4 +632,4 @@ CAN_ACCESS_ALL_USERS_GROUP_LIMITS_PRESENCE = False
|
|||
# in some places through the codebase.
|
||||
SIGNED_ACCESS_TOKEN_VALIDITY_IN_SECONDS = 60
|
||||
|
||||
CUSTOM_AUTHENTICATION_WRAPPER_FUNCTION: Optional[Callable[..., Optional["UserProfile"]]] = None
|
||||
CUSTOM_AUTHENTICATION_WRAPPER_FUNCTION: Optional[Callable[..., Any]] = None
|
||||
|
|
Loading…
Reference in New Issue