relib 1.2.5__py3-none-any.whl → 1.2.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
relib/system.py CHANGED
@@ -36,10 +36,11 @@ async def roll_tasks[T](tasks: Iterable[Awaitable[T]], workers: int, progress=Fa
36
36
  semaphore = asyncio.Semaphore(workers)
37
37
  if not progress:
38
38
  return await asyncio.gather(*(worker(task, semaphore) for task in tasks))
39
+
39
40
  from tqdm import tqdm
40
- assert isinstance(tasks, (list, tuple, set, frozenset, dict))
41
+ tasks = tasks if isinstance(tasks, list) else list(tasks)
41
42
  with tqdm(total=len(tasks)) as pbar:
42
- update = lambda: pbar.update(1)
43
+ update = functools.partial(pbar.update, 1)
43
44
  return await asyncio.gather(*(worker(task, semaphore, update) for task in tasks))
44
45
 
45
46
  def as_async(num_workers=default_num_workers) -> Callable[[Callable[P, R]], Callable[P, Awaitable[R]]]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: relib
3
- Version: 1.2.5
3
+ Version: 1.2.6
4
4
  Project-URL: Repository, https://github.com/Reddan/relib.git
5
5
  Author: Hampus Hallman
6
6
  License: Copyright 2018-2025 Hampus Hallman
@@ -1,9 +1,9 @@
1
1
  relib/__init__.py,sha256=E_ye3ZsGqW3xCibphEWtXhXjIJI58zVxX53VajgvG2Q,674
2
2
  relib/hashing.py,sha256=DB_fnkj0ls01FgZbf4nPFHl4EBU8X_0OrmDvty4HlRE,6020
3
3
  relib/measure_duration.py,sha256=LCTo_D_qReNprD3fhtJ0daeWycS6xQE_cwxeg2_h0xo,456
4
- relib/system.py,sha256=YSovHakRl4VjERuoFgYKMZcuSpBVtuQHdjlc_p_Dfr4,1921
4
+ relib/system.py,sha256=snk8Y7ou9zEe6Zmk18qlMZ3mMAb9k4yQDoXOPbeHLNo,1929
5
5
  relib/utils.py,sha256=4fM0zsAdfrM2w9Q1YKcTfFG5kDzoNgD2amkgfTG39OY,6933
6
- relib-1.2.5.dist-info/METADATA,sha256=xy2aVPv-Rhe5P93QDgxJzoJdvKvJoae5upeFwt5SgnE,1295
7
- relib-1.2.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
- relib-1.2.5.dist-info/licenses/LICENSE,sha256=9xVsdtv_-uSyY9Xl9yujwAPm4-mjcCLeVy-ljwXEWbo,1059
9
- relib-1.2.5.dist-info/RECORD,,
6
+ relib-1.2.6.dist-info/METADATA,sha256=HW81w0srpbZPqeo8qIlOA-DNUqXD7ulPhSuHRCpiFFs,1295
7
+ relib-1.2.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
+ relib-1.2.6.dist-info/licenses/LICENSE,sha256=9xVsdtv_-uSyY9Xl9yujwAPm4-mjcCLeVy-ljwXEWbo,1059
9
+ relib-1.2.6.dist-info/RECORD,,
File without changes