dycw-utilities 0.136.7__py3-none-any.whl → 0.136.8__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dycw-utilities
3
- Version: 0.136.7
3
+ Version: 0.136.8
4
4
  Author-email: Derek Wan <d.wan@icloud.com>
5
5
  License-File: LICENSE
6
6
  Requires-Python: >=3.12
@@ -1,4 +1,4 @@
1
- utilities/__init__.py,sha256=_gHgMWM-7wftYvG3CuC0fVylv31uuRdfxSdp2fJbITs,60
1
+ utilities/__init__.py,sha256=LoQF7frj1FsC8oJrGrNGBrr9qRbSyAYP8xZLub7u6hI,60
2
2
  utilities/aiolimiter.py,sha256=mD0wEiqMgwpty4XTbawFpnkkmJS6R4JRsVXFUaoitSU,628
3
3
  utilities/altair.py,sha256=HeZBVUocjkrTNwwKrClppsIqgNFF-ykv05HfZSoHYno,9104
4
4
  utilities/asyncio.py,sha256=dcGeKQzjLBXxKzZkVIk5oZsFXEcynVbRB9iNB5XEDZk,38526
@@ -36,7 +36,7 @@ utilities/luigi.py,sha256=wK7cB3y8NXeSa8d6r_yTKRmjMguNmIPmy52yg10vPaI,4774
36
36
  utilities/math.py,sha256=_6vrDyjtaqE_OFE-F2DNWrDG_J_kMl3nFAJsok9v_bY,26862
37
37
  utilities/memory_profiler.py,sha256=XzN56jDCa5aqXS_DxEjb_K4L6aIWh_5zyKi6OhcIxw0,853
38
38
  utilities/modules.py,sha256=iuvLluJya-hvl1Q25-Jk3dLgx2Es3ck4SjJiEkAlVTs,3195
39
- utilities/more_itertools.py,sha256=EX4P5JTc3p9fF3Ia3ZzPy9CEUe6OZcFqrrVplZ4pMaQ,10937
39
+ utilities/more_itertools.py,sha256=NEGXDT8COaxziaJFTiXYKX0gffwfKhCAMrq-Kgh0w8c,10937
40
40
  utilities/numpy.py,sha256=Xn23sA2ZbVNqwUYEgNJD3XBYH6IbCri_WkHSNhg3NkY,26122
41
41
  utilities/operator.py,sha256=fZM2DBZdjtU8Lh9Z-eHC4ktNr0vO3JfX8hXgIYwdvBI,3826
42
42
  utilities/optuna.py,sha256=C-fhWYiXHVPo1l8QctYkFJ4DyhbSrGorzP1dJb_qvd8,1933
@@ -88,7 +88,7 @@ utilities/warnings.py,sha256=un1LvHv70PU-LLv8RxPVmugTzDJkkGXRMZTE2-fTQHw,1771
88
88
  utilities/whenever.py,sha256=A-yoOqBqrcVD1yDINDsTFDw7dq9-zgUGn_f8CxVUQJs,23332
89
89
  utilities/zipfile.py,sha256=24lQc9ATcJxHXBPc_tBDiJk48pWyRrlxO2fIsFxU0A8,699
90
90
  utilities/zoneinfo.py,sha256=oEH-nL3t4h9uawyZqWDtNtDAl6M-CLpLYGI_nI6DulM,1971
91
- dycw_utilities-0.136.7.dist-info/METADATA,sha256=Y-Pj2EJoFNikG1cNjmfA9b8mzZdMzR_XpxuZX6hzBEc,1637
92
- dycw_utilities-0.136.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
93
- dycw_utilities-0.136.7.dist-info/licenses/LICENSE,sha256=gppZp16M6nSVpBbUBrNL6JuYfvKwZiKgV7XoKKsHzqo,1066
94
- dycw_utilities-0.136.7.dist-info/RECORD,,
91
+ dycw_utilities-0.136.8.dist-info/METADATA,sha256=rKDsTulyR9hUod-Rdng5s8hRoRgfivymmIuqq1TU-CA,1637
92
+ dycw_utilities-0.136.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
93
+ dycw_utilities-0.136.8.dist-info/licenses/LICENSE,sha256=gppZp16M6nSVpBbUBrNL6JuYfvKwZiKgV7XoKKsHzqo,1066
94
+ dycw_utilities-0.136.8.dist-info/RECORD,,
utilities/__init__.py CHANGED
@@ -1,3 +1,3 @@
1
1
  from __future__ import annotations
2
2
 
3
- __version__ = "0.136.7"
3
+ __version__ = "0.136.8"
@@ -28,50 +28,59 @@ if TYPE_CHECKING:
28
28
 
29
29
 
30
30
  @overload
31
- def bucket_mapping[T, U, UH: Hashable](
31
+ def bucket_mapping[T, UH: Hashable](
32
32
  iterable: Iterable[T],
33
33
  func: Callable[[T], UH],
34
34
  /,
35
35
  *,
36
- pre: Callable[[T], U],
36
+ pre: None = None,
37
+ post: None = None,
38
+ ) -> Mapping[UH, Iterator[T]]: ...
39
+ @overload
40
+ def bucket_mapping[T, UH: Hashable](
41
+ iterable: Iterable[T],
42
+ func: Callable[[T], UH],
43
+ /,
44
+ *,
45
+ pre: None = None,
37
46
  post: Literal["list"],
38
- ) -> Mapping[UH, list[U]]: ...
47
+ ) -> Mapping[UH, list[T]]: ...
39
48
  @overload
40
- def bucket_mapping[T, U, UH: Hashable](
49
+ def bucket_mapping[T, UH: Hashable](
41
50
  iterable: Iterable[T],
42
51
  func: Callable[[T], UH],
43
52
  /,
44
53
  *,
45
- pre: Callable[[T], U],
54
+ pre: None = None,
46
55
  post: Literal["tuple"],
47
- ) -> Mapping[UH, tuple[U, ...]]: ...
56
+ ) -> Mapping[UH, tuple[T, ...]]: ...
48
57
  @overload
49
- def bucket_mapping[T, U, UH: Hashable](
58
+ def bucket_mapping[T, UH: Hashable](
50
59
  iterable: Iterable[T],
51
60
  func: Callable[[T], UH],
52
61
  /,
53
62
  *,
54
- pre: Callable[[T], U],
63
+ pre: None = None,
55
64
  post: Literal["set"],
56
- ) -> Mapping[UH, set[U]]: ...
65
+ ) -> Mapping[UH, set[T]]: ...
57
66
  @overload
58
- def bucket_mapping[T, U, UH: Hashable](
67
+ def bucket_mapping[T, UH: Hashable](
59
68
  iterable: Iterable[T],
60
69
  func: Callable[[T], UH],
61
70
  /,
62
71
  *,
63
- pre: Callable[[T], U],
72
+ pre: None = None,
64
73
  post: Literal["frozenset"],
65
- ) -> Mapping[UH, frozenset[U]]: ...
74
+ ) -> Mapping[UH, frozenset[T]]: ...
66
75
  @overload
67
- def bucket_mapping[T, U, UH: Hashable](
76
+ def bucket_mapping[T, UH: Hashable](
68
77
  iterable: Iterable[T],
69
78
  func: Callable[[T], UH],
70
79
  /,
71
80
  *,
72
- pre: Callable[[T], U] | None = None,
81
+ pre: None = None,
73
82
  post: Literal["unique"],
74
- ) -> Mapping[UH, U]: ...
83
+ ) -> Mapping[UH, T]: ...
75
84
  @overload
76
85
  def bucket_mapping[T, U, UH: Hashable](
77
86
  iterable: Iterable[T],
@@ -82,59 +91,50 @@ def bucket_mapping[T, U, UH: Hashable](
82
91
  post: None = None,
83
92
  ) -> Mapping[UH, Iterator[U]]: ...
84
93
  @overload
85
- def bucket_mapping[T, UH: Hashable](
94
+ def bucket_mapping[T, U, UH: Hashable](
86
95
  iterable: Iterable[T],
87
96
  func: Callable[[T], UH],
88
97
  /,
89
98
  *,
90
- pre: None = None,
99
+ pre: Callable[[T], U],
91
100
  post: Literal["list"],
92
- ) -> Mapping[UH, list[T]]: ...
101
+ ) -> Mapping[UH, list[U]]: ...
93
102
  @overload
94
- def bucket_mapping[T, UH: Hashable](
103
+ def bucket_mapping[T, U, UH: Hashable](
95
104
  iterable: Iterable[T],
96
105
  func: Callable[[T], UH],
97
106
  /,
98
107
  *,
99
- pre: None = None,
108
+ pre: Callable[[T], U],
100
109
  post: Literal["tuple"],
101
- ) -> Mapping[UH, tuple[T, ...]]: ...
110
+ ) -> Mapping[UH, tuple[U, ...]]: ...
102
111
  @overload
103
- def bucket_mapping[T, UH: Hashable](
112
+ def bucket_mapping[T, U, UH: Hashable](
104
113
  iterable: Iterable[T],
105
114
  func: Callable[[T], UH],
106
115
  /,
107
116
  *,
108
- pre: None = None,
117
+ pre: Callable[[T], U],
109
118
  post: Literal["set"],
110
- ) -> Mapping[UH, set[T]]: ...
119
+ ) -> Mapping[UH, set[U]]: ...
111
120
  @overload
112
- def bucket_mapping[T, UH: Hashable](
121
+ def bucket_mapping[T, U, UH: Hashable](
113
122
  iterable: Iterable[T],
114
123
  func: Callable[[T], UH],
115
124
  /,
116
125
  *,
117
- pre: None = None,
126
+ pre: Callable[[T], U],
118
127
  post: Literal["frozenset"],
119
- ) -> Mapping[UH, frozenset[T]]: ...
128
+ ) -> Mapping[UH, frozenset[U]]: ...
120
129
  @overload
121
- def bucket_mapping[T, UH: Hashable](
130
+ def bucket_mapping[T, U, UH: Hashable](
122
131
  iterable: Iterable[T],
123
132
  func: Callable[[T], UH],
124
133
  /,
125
134
  *,
126
- pre: None = None,
135
+ pre: Callable[[T], U] | None = None,
127
136
  post: Literal["unique"],
128
- ) -> Mapping[UH, T]: ...
129
- @overload
130
- def bucket_mapping[T, UH: Hashable](
131
- iterable: Iterable[T],
132
- func: Callable[[T], UH],
133
- /,
134
- *,
135
- pre: None = None,
136
- post: None = None,
137
- ) -> Mapping[UH, Iterator[T]]: ...
137
+ ) -> Mapping[UH, U]: ...
138
138
  @overload
139
139
  def bucket_mapping[T, U, UH: Hashable](
140
140
  iterable: Iterable[T],