relib 1.2.5__tar.gz → 1.2.6__tar.gz

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.
@@ -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,6 +1,6 @@
1
1
  [project]
2
2
  name = "relib"
3
- version = "1.2.5"
3
+ version = "1.2.6"
4
4
  requires-python = ">=3.12"
5
5
  dependencies = []
6
6
  authors = [
@@ -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]]]:
@@ -106,7 +106,7 @@ wheels = [
106
106
 
107
107
  [[package]]
108
108
  name = "relib"
109
- version = "1.2.5"
109
+ version = "1.2.6"
110
110
  source = { editable = "." }
111
111
 
112
112
  [package.dev-dependencies]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes