ruff: Fix C416 Unnecessary list comprehension.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2023-09-24 22:54:17 -07:00
committed by Anders Kaseorg
parent 9c20be8ffc
commit dd7b09d71a

View File

@@ -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: