zhmiscellany 6.2.0__py3-none-any.whl → 6.2.2__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.
@@ -8,7 +8,7 @@ import io
8
8
  from unittest.mock import patch
9
9
 
10
10
  # Ray availability check
11
- if sys.platform == "win32":
11
+ if sys.platform == "win32" or True:
12
12
  try:
13
13
  import ray
14
14
  RAY_AVAILABLE = True
@@ -4,6 +4,7 @@ import traceback
4
4
  import zhmiscellany.string
5
5
  import concurrent.futures
6
6
  import subprocess, zlib, pickle, dill, tempfile, os, base64
7
+ from itertools import chain
7
8
 
8
9
 
9
10
  def start_daemon(**kwargs):
@@ -13,7 +14,7 @@ def start_daemon(**kwargs):
13
14
  return thread
14
15
 
15
16
 
16
- def batch_threading(targets, max_threads=None, show_errors=True):
17
+ def batch_threading(targets, max_threads=None, show_errors=True, flatten=False):
17
18
  def execute_target(target):
18
19
  try: return target[0](*target[1])
19
20
  except Exception:
@@ -27,6 +28,8 @@ def batch_threading(targets, max_threads=None, show_errors=True):
27
28
  for f in concurrent.futures.as_completed(futures):
28
29
  try: results[futures[f]] = f.result()
29
30
  except Exception: results[futures[f]] = None
31
+ if flatten:
32
+ results = list(chain.from_iterable(results))
30
33
  return results
31
34
 
32
35
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zhmiscellany
3
- Version: 6.2.0
3
+ Version: 6.2.2
4
4
  Summary: A collection of useful/interesting python libraries made by zh.
5
5
  Home-page: https://discord.gg/ThBBAuueVJ
6
6
  Author: zh
@@ -10,6 +10,7 @@ Classifier: Programming Language :: Python :: 3
10
10
  Classifier: Operating System :: Microsoft :: Windows
11
11
  Requires-Python: >=3.6
12
12
  Description-Content-Type: text/markdown
13
+ Requires-Dist: ray>=0
13
14
  Requires-Dist: pycryptodome>=0
14
15
  Requires-Dist: discum==1.1.0
15
16
  Requires-Dist: requests>=0
@@ -22,7 +23,6 @@ Requires-Dist: pillow>=0
22
23
  Requires-Dist: fuzzywuzzy>=0
23
24
  Requires-Dist: orjson>=0
24
25
  Requires-Dist: pyautogui>=0; sys_platform == "linux"
25
- Requires-Dist: ray>=0; sys_platform == "win32"
26
26
  Requires-Dist: pywin32>=0; sys_platform == "win32"
27
27
  Requires-Dist: random-header-generator>=0; sys_platform == "win32"
28
28
  Requires-Dist: pydirectinput>=0; sys_platform == "win32"
@@ -2,7 +2,7 @@ zhmiscellany/__init__.py,sha256=Oh3gAJRWq2aUEgkolmQyiZOQ3iey5OC4NA2XaTHuVv4,1139
2
2
  zhmiscellany/_discord_supportfuncs.py,sha256=RotSpurqFtL5q6v_ST1e2Y_1qJMaHp1CDsF5i-gR4ec,6524
3
3
  zhmiscellany/_fileio_supportfuncs.py,sha256=soibLv9nOR79sHQ2MGQH2O6MhnqdXqI7ybxHSN2Tfac,434
4
4
  zhmiscellany/_misc_supportfuncs.py,sha256=RH1keGtoVjJOFh7MWOTJ2BJijLLeEvsMy9tNumdd6Uk,9944
5
- zhmiscellany/_processing_supportfuncs.py,sha256=XWyH6VNQLhHqnYLL9LJwU0hJ6PGzZNJXT8Gfmb-GRw8,11083
5
+ zhmiscellany/_processing_supportfuncs.py,sha256=Vicz7_v2HSOrUcrnbiq-6a-bP7grS3Wk36wENF9GTnA,11091
6
6
  zhmiscellany/_py_resources.py,sha256=HqJs5aRLymLZ2J5Io8g6bY58pGWhN9b8vCktC2DW4KQ,229009
7
7
  zhmiscellany/_resource_files_lookup.py,sha256=hsgPW0dngokgqWrAVAv5rUo-eobzJPjvWHt4xrOG5l0,856
8
8
  zhmiscellany/cpp.py,sha256=XEUEoIKCDCdY5VgwNWE5oXrGjtsmGdz_MnaVwQmi2dk,179
@@ -18,10 +18,10 @@ zhmiscellany/misc.py,sha256=llL3ZHD5pxS4RDKLj3gX0k3NpE2mM5g3JVd0k_RvIUg,31979
18
18
  zhmiscellany/netio.py,sha256=VCqlo3ev_iOTTu5sXTZQwsYU0WMbAlOTDRsJ5Dj5-fc,2519
19
19
  zhmiscellany/pastebin.py,sha256=TbZ3DqFYXo5qt5d95ugrofYoptlzKkjXUr7VnEqa6ks,6357
20
20
  zhmiscellany/pipes.py,sha256=zETvWP4PF-PuSzYwR1UCodY4ftNAgmCChb9DUMofXok,4657
21
- zhmiscellany/processing.py,sha256=sDKIbzG9TNFyT6yJ4TJL59taG-59_v3CBLekVSLrwgE,10899
21
+ zhmiscellany/processing.py,sha256=CUHgbNp8RetXDpc6DuojThi3T2iu_DX09P_WD8iUZ7s,11014
22
22
  zhmiscellany/rust.py,sha256=znN6DYNoa_p-braTuDZKvUnXX8reWLFu_dG4fv2vLR0,442
23
23
  zhmiscellany/string.py,sha256=xyqE6V5YF2nieZDcg5ZrXTIrH2D9oDRbZ5vQGz8rPys,4787
24
- zhmiscellany-6.2.0.dist-info/METADATA,sha256=DTek7AuyuDVVPMuJHunsnv3oD5CPsHgJYLXaRFJaC78,43897
25
- zhmiscellany-6.2.0.dist-info/WHEEL,sha256=hPN0AlP2dZM_3ZJZWP4WooepkmU9wzjGgCLCeFjkHLA,92
26
- zhmiscellany-6.2.0.dist-info/top_level.txt,sha256=ioDtsrevCI52rTxZntMPljRIBsZs73tD0hI00HektiE,13
27
- zhmiscellany-6.2.0.dist-info/RECORD,,
24
+ zhmiscellany-6.2.2.dist-info/METADATA,sha256=lTQiC99cquo9TsWwBfhOFBgxjC8ckoazB9ThxwocBj4,43872
25
+ zhmiscellany-6.2.2.dist-info/WHEEL,sha256=hPN0AlP2dZM_3ZJZWP4WooepkmU9wzjGgCLCeFjkHLA,92
26
+ zhmiscellany-6.2.2.dist-info/top_level.txt,sha256=ioDtsrevCI52rTxZntMPljRIBsZs73tD0hI00HektiE,13
27
+ zhmiscellany-6.2.2.dist-info/RECORD,,