mirror of
https://github.com/zulip/zulip.git
synced 2025-10-25 17:14:02 +00:00
ruff: Fix C416 Unnecessary list comprehension.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Anders Kaseorg
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:
|
||||||
|
|||||||
Reference in New Issue
Block a user