mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
ruff: Fix C416 Unnecessary list
comprehension.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit dd7b09d71a
)
This commit is contained in:
committed by
Tim Abbott
parent
a7b8e4795d
commit
8e1ebede1b
@@ -172,10 +172,7 @@ class RegistrationForm(RealmDetailsForm):
|
||||
required=False,
|
||||
coerce=int,
|
||||
empty_value=None,
|
||||
choices=[
|
||||
(value, name)
|
||||
for value, name in UserProfile.EMAIL_ADDRESS_VISIBILITY_ID_TO_NAME_MAP.items()
|
||||
],
|
||||
choices=list(UserProfile.EMAIL_ADDRESS_VISIBILITY_ID_TO_NAME_MAP.items()),
|
||||
)
|
||||
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
||||
@@ -217,10 +214,7 @@ class ToSForm(forms.Form):
|
||||
required=False,
|
||||
coerce=int,
|
||||
empty_value=None,
|
||||
choices=[
|
||||
(value, name)
|
||||
for value, name in UserProfile.EMAIL_ADDRESS_VISIBILITY_ID_TO_NAME_MAP.items()
|
||||
],
|
||||
choices=list(UserProfile.EMAIL_ADDRESS_VISIBILITY_ID_TO_NAME_MAP.items()),
|
||||
)
|
||||
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
||||
|
Reference in New Issue
Block a user