mirror of https://github.com/zulip/zulip.git
ruff: Fix C416 Unnecessary `list` comprehension.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
9c20be8ffc
commit
dd7b09d71a
|
@ -164,10 +164,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:
|
||||
|
@ -209,10 +206,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:
|
||||
|
|
Loading…
Reference in New Issue