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,
|
required=False,
|
||||||
coerce=int,
|
coerce=int,
|
||||||
empty_value=None,
|
empty_value=None,
|
||||||
choices=[
|
choices=list(UserProfile.EMAIL_ADDRESS_VISIBILITY_ID_TO_NAME_MAP.items()),
|
||||||
(value, name)
|
|
||||||
for value, name in UserProfile.EMAIL_ADDRESS_VISIBILITY_ID_TO_NAME_MAP.items()
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
||||||
|
@ -209,10 +206,7 @@ class ToSForm(forms.Form):
|
||||||
required=False,
|
required=False,
|
||||||
coerce=int,
|
coerce=int,
|
||||||
empty_value=None,
|
empty_value=None,
|
||||||
choices=[
|
choices=list(UserProfile.EMAIL_ADDRESS_VISIBILITY_ID_TO_NAME_MAP.items()),
|
||||||
(value, name)
|
|
||||||
for value, name in UserProfile.EMAIL_ADDRESS_VISIBILITY_ID_TO_NAME_MAP.items()
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
||||||
|
|
Loading…
Reference in New Issue