mirror of https://github.com/zulip/zulip.git
ruff: Fix PLC0208 Use a sequence type when iterating over values.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
b907ad0dcb
commit
b7909db987
|
@ -25,7 +25,7 @@ class Command(ZulipBaseCommand):
|
|||
user_profiles = self.get_users(options, realm)
|
||||
stream_names = {stream.strip() for stream in options["streams"].split(",")}
|
||||
|
||||
for stream_name in set(stream_names):
|
||||
for stream_name in stream_names:
|
||||
for user_profile in user_profiles:
|
||||
stream = ensure_stream(realm, stream_name, acting_user=None)
|
||||
_ignore, already_subscribed = bulk_add_subscriptions(
|
||||
|
|
|
@ -40,7 +40,7 @@ Create default stream groups which the users can choose during sign up.
|
|||
|
||||
streams = []
|
||||
stream_names = {stream.strip() for stream in options["streams"].split(",")}
|
||||
for stream_name in set(stream_names):
|
||||
for stream_name in stream_names:
|
||||
stream = ensure_stream(realm, stream_name, acting_user=None)
|
||||
streams.append(stream)
|
||||
|
||||
|
|
|
@ -1588,7 +1588,7 @@ class SocialAuthBase(DesktopFlowTestingLib, ZulipTestCase, ABC):
|
|||
|
||||
stream_names = ["new_stream_1", "new_stream_2"]
|
||||
streams = []
|
||||
for stream_name in set(stream_names):
|
||||
for stream_name in stream_names:
|
||||
stream = ensure_stream(realm, stream_name, acting_user=None)
|
||||
streams.append(stream)
|
||||
|
||||
|
@ -4599,7 +4599,7 @@ class GoogleAuthBackendTest(SocialAuthBase):
|
|||
|
||||
stream_names = ["new_stream_1", "new_stream_2"]
|
||||
streams = []
|
||||
for stream_name in set(stream_names):
|
||||
for stream_name in stream_names:
|
||||
stream = ensure_stream(realm, stream_name, acting_user=None)
|
||||
streams.append(stream)
|
||||
|
||||
|
|
|
@ -867,7 +867,7 @@ class ZulipLDAPAuthBackendBase(ZulipAuthMixin, LDAPBackend):
|
|||
if "full_name" in settings.AUTH_LDAP_USER_ATTR_MAP:
|
||||
full_name_attr = settings.AUTH_LDAP_USER_ATTR_MAP["full_name"]
|
||||
full_name = ldap_user.attrs[full_name_attr][0]
|
||||
elif all(key in settings.AUTH_LDAP_USER_ATTR_MAP for key in {"first_name", "last_name"}):
|
||||
elif all(key in settings.AUTH_LDAP_USER_ATTR_MAP for key in ["first_name", "last_name"]):
|
||||
first_name_attr = settings.AUTH_LDAP_USER_ATTR_MAP["first_name"]
|
||||
last_name_attr = settings.AUTH_LDAP_USER_ATTR_MAP["last_name"]
|
||||
first_name = ldap_user.attrs[first_name_attr][0]
|
||||
|
|
Loading…
Reference in New Issue