mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 07:16:31 +03:00
chore(python): fix ruff 0.0.286 warnings
This commit is contained in:
@@ -427,7 +427,7 @@ class Account:
|
|||||||
|
|
||||||
assert dc_chatlist != ffi.NULL
|
assert dc_chatlist != ffi.NULL
|
||||||
chatlist = []
|
chatlist = []
|
||||||
for i in range(0, lib.dc_chatlist_get_cnt(dc_chatlist)):
|
for i in range(lib.dc_chatlist_get_cnt(dc_chatlist)):
|
||||||
chat_id = lib.dc_chatlist_get_chat_id(dc_chatlist, i)
|
chat_id = lib.dc_chatlist_get_chat_id(dc_chatlist, i)
|
||||||
chatlist.append(Chat(self, chat_id))
|
chatlist.append(Chat(self, chat_id))
|
||||||
return chatlist
|
return chatlist
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ def as_dc_charpointer(obj):
|
|||||||
|
|
||||||
|
|
||||||
def iter_array(dc_array_t, constructor: Callable[[int], T]) -> Generator[T, None, None]:
|
def iter_array(dc_array_t, constructor: Callable[[int], T]) -> Generator[T, None, None]:
|
||||||
for i in range(0, lib.dc_array_get_cnt(dc_array_t)):
|
for i in range(lib.dc_array_get_cnt(dc_array_t)):
|
||||||
yield constructor(lib.dc_array_get_id(dc_array_t, i))
|
yield constructor(lib.dc_array_get_id(dc_array_t, i))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,6 @@ class TestEmpty:
|
|||||||
def test_prepare_setup_measurings(self, acfactory):
|
def test_prepare_setup_measurings(self, acfactory):
|
||||||
acfactory.get_online_accounts(BENCH_NUM)
|
acfactory.get_online_accounts(BENCH_NUM)
|
||||||
|
|
||||||
@pytest.mark.parametrize("num", range(0, BENCH_NUM + 1))
|
@pytest.mark.parametrize("num", range(BENCH_NUM + 1))
|
||||||
def test_setup_online_accounts(self, acfactory, num):
|
def test_setup_online_accounts(self, acfactory, num):
|
||||||
acfactory.get_online_accounts(num)
|
acfactory.get_online_accounts(num)
|
||||||
|
|||||||
Reference in New Issue
Block a user