python-iterutils 0.2.4__py3-none-any.whl → 0.2.4.1__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.
iterutils/__init__.py CHANGED
@@ -85,7 +85,8 @@ def _get_async(back: int = 2, /) -> bool:
85
85
  return f_locals.get("async_") or False
86
86
  while f_locals is not None and f_locals is not f_globals:
87
87
  if "async_" in f_locals:
88
- return f_locals["async_"] or False
88
+ if f_locals["async_"] is not None:
89
+ return f_locals["async_"]
89
90
  f = f.f_back
90
91
  if f is None:
91
92
  break
@@ -270,8 +271,12 @@ def as_gen_step[**Args](
270
271
  /,
271
272
  ) -> Callable[Args, Any]:
272
273
  def wrapper(*args: Args.args, **kwds: Args.kwargs):
273
- async_ = cast(None | Literal[False, True], kwds.pop("async_", None))
274
- return run_gen_step(gen_step, async_, *args, **kwds)
274
+ return run_gen_step(
275
+ gen_step,
276
+ cast(None | Literal[False, True], kwds.pop("async_", None)),
277
+ *args,
278
+ **kwds,
279
+ )
275
280
  return wrapper
276
281
 
277
282
 
@@ -280,8 +285,12 @@ def as_gen_step_iter[**Args](
280
285
  /,
281
286
  ) -> Callable[Args, Iterable | AsyncIterable]:
282
287
  def wrapper(*args: Args.args, **kwds: Args.kwargs):
283
- async_ = cast(None | Literal[False, True], kwds.pop("async_", None))
284
- return run_gen_step_iter(gen_step, async_, *args, **kwds)
288
+ return run_gen_step_iter(
289
+ gen_step,
290
+ cast(None | Literal[False, True], kwds.pop("async_", None)),
291
+ *args,
292
+ **kwds,
293
+ )
285
294
  return wrapper
286
295
 
287
296
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-iterutils
3
- Version: 0.2.4
3
+ Version: 0.2.4.1
4
4
  Summary: Python another itertools.
5
5
  Home-page: https://github.com/ChenyangGao/web-mount-packs/tree/main/python-module/python-iterutils
6
6
  License: MIT
@@ -0,0 +1,7 @@
1
+ LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
2
+ iterutils/__init__.py,sha256=PW8t1JlDHbCxjkGy5zS-N0ciichPcweQUnmQ8VVjPZM,30357
3
+ iterutils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ python_iterutils-0.2.4.1.dist-info/LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
5
+ python_iterutils-0.2.4.1.dist-info/METADATA,sha256=0GJMUTpixBKxJj_YZHvwHPUzry3zhTI0jU11H7vrGQs,1427
6
+ python_iterutils-0.2.4.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
7
+ python_iterutils-0.2.4.1.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
2
- iterutils/__init__.py,sha256=1DAr8LAf7Gge6iCv7YTDLAu_uI4EqWbuzWBfyAT76nE,30237
3
- iterutils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- python_iterutils-0.2.4.dist-info/LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
5
- python_iterutils-0.2.4.dist-info/METADATA,sha256=z2H59Xf9TIn6I8XRGLHxenhfVyMGXOMErl5x0dooOWU,1425
6
- python_iterutils-0.2.4.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
7
- python_iterutils-0.2.4.dist-info/RECORD,,