mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
python: Reformat with Black, except quotes.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
5028c081cb
commit
11741543da
@@ -14,9 +14,8 @@ class Command(ZulipBaseCommand):
|
||||
self.add_user_list_args(parser, all_users_help="Add all users in realm to these streams.")
|
||||
|
||||
parser.add_argument(
|
||||
'-s', '--streams',
|
||||
required=True,
|
||||
help='A comma-separated list of stream names.')
|
||||
'-s', '--streams', required=True, help='A comma-separated list of stream names.'
|
||||
)
|
||||
|
||||
def handle(self, **options: Any) -> None:
|
||||
realm = self.get_realm(options)
|
||||
@@ -28,8 +27,14 @@ class Command(ZulipBaseCommand):
|
||||
for stream_name in set(stream_names):
|
||||
for user_profile in user_profiles:
|
||||
stream = ensure_stream(realm, stream_name, acting_user=None)
|
||||
_ignore, already_subscribed = bulk_add_subscriptions(realm, [stream], [user_profile])
|
||||
_ignore, already_subscribed = bulk_add_subscriptions(
|
||||
realm, [stream], [user_profile]
|
||||
)
|
||||
was_there_already = user_profile.id in (info.user.id for info in already_subscribed)
|
||||
print("{} {} to {}".format(
|
||||
"Already subscribed" if was_there_already else "Subscribed",
|
||||
user_profile.delivery_email, stream_name))
|
||||
print(
|
||||
"{} {} to {}".format(
|
||||
"Already subscribed" if was_there_already else "Subscribed",
|
||||
user_profile.delivery_email,
|
||||
stream_name,
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user