mirror of
https://github.com/zulip/zulip.git
synced 2025-10-24 08:33:43 +00:00
ruff: Fix FURB148 enumerate index or value is unused.
This is a preview rule, not yet enabled by default. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
9a2c80dcb6
commit
fe71eaa8f0
@@ -226,7 +226,7 @@ def get_remote_server_activity(request: HttpRequest) -> HttpResponse:
|
|||||||
row.append(user_counts.guest_user_count)
|
row.append(user_counts.guest_user_count)
|
||||||
|
|
||||||
# Format column data and add total row
|
# Format column data and add total row
|
||||||
for i, col in enumerate(cols):
|
for i in range(len(cols)):
|
||||||
if i == LAST_AUDIT_LOG_DATE:
|
if i == LAST_AUDIT_LOG_DATE:
|
||||||
fix_rows(rows, i, format_optional_datetime)
|
fix_rows(rows, i, format_optional_datetime)
|
||||||
if i in [MOBILE_USER_COUNT, MOBILE_PUSH_COUNT]:
|
if i in [MOBILE_USER_COUNT, MOBILE_PUSH_COUNT]:
|
||||||
|
|||||||
@@ -740,8 +740,7 @@ class UpdateCustomProfileFieldTest(CustomProfileFieldTestCase):
|
|||||||
data: list[ProfileDataElementUpdateDict] = []
|
data: list[ProfileDataElementUpdateDict] = []
|
||||||
expected_value: dict[int, ProfileDataElementValue] = {}
|
expected_value: dict[int, ProfileDataElementValue] = {}
|
||||||
expected_rendered_value: dict[int, str | None] = {}
|
expected_rendered_value: dict[int, str | None] = {}
|
||||||
for i, field_value in enumerate(fields):
|
for name, value in fields:
|
||||||
name, value = field_value
|
|
||||||
field = CustomProfileField.objects.get(name=name, realm=realm)
|
field = CustomProfileField.objects.get(name=name, realm=realm)
|
||||||
data.append(
|
data.append(
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user