requirements: Upgrade Python requirements.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit f223251ffe)
This commit is contained in:
Anders Kaseorg
2025-01-13 15:26:37 -08:00
committed by Tim Abbott
parent cd485ef162
commit d28639c08e
18 changed files with 1032 additions and 1066 deletions

View File

@@ -850,9 +850,9 @@ class ZulipLDAPAuthBackendBase(ZulipAuthMixin, LDAPBackend):
true_values = ["TRUE", "YES"]
false_values = ["FALSE", "NO"]
attr_value_upper = attr_value.upper()
assert (
attr_value_upper in true_values or attr_value_upper in false_values
), f"Invalid value '{attr_value}' in the LDAP attribute mapped to deactivated"
assert attr_value_upper in true_values or attr_value_upper in false_values, (
f"Invalid value '{attr_value}' in the LDAP attribute mapped to deactivated"
)
return attr_value_upper in true_values
def is_account_realm_access_forbidden(self, ldap_user: _LDAPUser, realm: Realm) -> bool:
@@ -1443,9 +1443,9 @@ class ExternalAuthResult:
data_dict = {}
if login_token is not None:
assert (not data_dict) and (
user_profile is None
), "Passing in data_dict or user_profile with login_token is disallowed."
assert (not data_dict) and (user_profile is None), (
"Passing in data_dict or user_profile with login_token is disallowed."
)
assert request is not None, "Passing in request with login_token is required."
self.instantiate_with_token(request, login_token, delete_stored_data)
else: