mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
ruff: Fix RUF015 Prefer next(...) over single element slice.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
4e645c8ff9
commit
3b09197fdf
@@ -1542,7 +1542,8 @@ Output:
|
||||
return values
|
||||
|
||||
def find_by_id(self, data: List[Dict[str, Any]], db_id: int) -> Dict[str, Any]:
|
||||
return [r for r in data if r["id"] == db_id][0]
|
||||
[r] = (r for r in data if r["id"] == db_id)
|
||||
return r
|
||||
|
||||
def init_default_ldap_database(self) -> None:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user