dycw-utilities 0.151.1__py3-none-any.whl → 0.151.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dycw-utilities
3
- Version: 0.151.1
3
+ Version: 0.151.2
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=bBf9Tl-C2hugDGfPB8K4pQzyp1XJyFusRFY_wkOtfbk,60
1
+ utilities/__init__.py,sha256=Db7AHp-oHna0M-k09B1taHjAQAZ8qv9CvudrDi3y72w,60
2
2
  utilities/altair.py,sha256=92E2lCdyHY4Zb-vCw6rEJIsWdKipuu-Tu2ab1ufUfAk,9079
3
3
  utilities/asyncio.py,sha256=2m2a2C-Qgc6OHTTHL332-t66A7xDITt_SORT7a1DJWo,16792
4
4
  utilities/atomicwrites.py,sha256=xcOWenTBRS0oat3kg7Sqe51AohNThMQ2ixPL7QCG8hw,5795
@@ -76,7 +76,7 @@ utilities/threading.py,sha256=GvBOp4CyhHfN90wGXZuA2VKe9fGzMaEa7oCl4f3nnPU,1009
76
76
  utilities/timer.py,sha256=oXfTii6ymu57niP0BDGZjFD55LEHi2a19kqZKiTgaFQ,2588
77
77
  utilities/traceback.py,sha256=zofhzIedpUHrzDNiRJDVzm_wuu_tlTQvVqK4quxVlgM,9151
78
78
  utilities/typed_settings.py,sha256=98OQQsXyfjxbGPjWqG45P_DoNgrzS4gZ7062oD2lgtE,4481
79
- utilities/types.py,sha256=iDfk_Z96v7cIxPlgGYMap0fYmjgRUJ7uQzPPCQe1odY,18115
79
+ utilities/types.py,sha256=gvi9bJDbX57nwA-V_TDRrdZoUXQ1FvXNUuiu0WdVk5g,18376
80
80
  utilities/typing.py,sha256=Z-_XDaWyT_6wIo3qfNK-hvRlzxP2Jxa9PgXzm5rDYRA,13790
81
81
  utilities/tzdata.py,sha256=fgNVj66yUbCSI_-vrRVzSD3gtf-L_8IEJEPjP_Jel5Y,266
82
82
  utilities/tzlocal.py,sha256=KyCXEgCTjqGFx-389JdTuhMRUaT06U1RCMdWoED-qro,728
@@ -89,8 +89,8 @@ utilities/zoneinfo.py,sha256=oEH-nL3t4h9uawyZqWDtNtDAl6M-CLpLYGI_nI6DulM,1971
89
89
  utilities/pytest_plugins/__init__.py,sha256=U4S_2y3zgLZVfMenHRaJFBW8yqh2mUBuI291LGQVOJ8,35
90
90
  utilities/pytest_plugins/pytest_randomly.py,sha256=NXzCcGKbpgYouz5yehKb4jmxmi2SexKKpgF4M65bi10,414
91
91
  utilities/pytest_plugins/pytest_regressions.py,sha256=Iwhfv_OJH7UCPZCfoh7ugZ2Xjqjil-BBBsOb8sDwiGI,1471
92
- dycw_utilities-0.151.1.dist-info/METADATA,sha256=Ooil0Z8qgBzFL5vPNHUBYeOBu0IY_K6DKtX1is2oQ08,1696
93
- dycw_utilities-0.151.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
94
- dycw_utilities-0.151.1.dist-info/entry_points.txt,sha256=BOD_SoDxwsfJYOLxhrSXhHP_T7iw-HXI9f2WVkzYxvQ,135
95
- dycw_utilities-0.151.1.dist-info/licenses/LICENSE,sha256=gppZp16M6nSVpBbUBrNL6JuYfvKwZiKgV7XoKKsHzqo,1066
96
- dycw_utilities-0.151.1.dist-info/RECORD,,
92
+ dycw_utilities-0.151.2.dist-info/METADATA,sha256=ZFPqnjQGCpOTu9TdbdK87-N9HnlXZfrSrTHA5YY8XSU,1696
93
+ dycw_utilities-0.151.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
94
+ dycw_utilities-0.151.2.dist-info/entry_points.txt,sha256=BOD_SoDxwsfJYOLxhrSXhHP_T7iw-HXI9f2WVkzYxvQ,135
95
+ dycw_utilities-0.151.2.dist-info/licenses/LICENSE,sha256=gppZp16M6nSVpBbUBrNL6JuYfvKwZiKgV7XoKKsHzqo,1066
96
+ dycw_utilities-0.151.2.dist-info/RECORD,,
utilities/__init__.py CHANGED
@@ -1,3 +1,3 @@
1
1
  from __future__ import annotations
2
2
 
3
- __version__ = "0.151.1"
3
+ __version__ = "0.151.2"
utilities/types.py CHANGED
@@ -2,7 +2,15 @@ from __future__ import annotations
2
2
 
3
3
  import datetime as dt
4
4
  from asyncio import Event
5
- from collections.abc import Callable, Coroutine, Hashable, Iterable, Mapping, Sequence
5
+ from collections.abc import (
6
+ Callable,
7
+ Collection,
8
+ Coroutine,
9
+ Hashable,
10
+ Iterable,
11
+ Mapping,
12
+ Sequence,
13
+ )
6
14
  from enum import Enum
7
15
  from ipaddress import IPv4Address, IPv6Address
8
16
  from logging import Logger
@@ -115,12 +123,15 @@ IPv6AddressLike = MaybeStr[IPv6Address]
115
123
 
116
124
 
117
125
  # iterables
118
- type MaybeIterable[T] = T | Iterable[T]
126
+ type CollectionStr = frozenset[str] | list[str] | set[str] | tuple[str, ...]
119
127
  type IterableHashable[T: Hashable] = tuple[T, ...] | frozenset[T]
120
- type MaybeList[T] = T | list[T]
128
+ type MaybeCollection[T] = T | Collection[T]
129
+ type MaybeCollectionStr = str | CollectionStr
130
+ type MaybeIterableHashable[T: Hashable] = T | IterableHashable[T]
131
+ type MaybeIterable[T] = T | Iterable[T]
121
132
  type MaybeListStr = MaybeList[str]
133
+ type MaybeList[T] = T | list[T]
122
134
  type MaybeSequence[T] = T | Sequence[T]
123
- type MaybeIterableHashable[T: Hashable] = T | IterableHashable[T]
124
135
 
125
136
 
126
137
  # logging
@@ -283,6 +294,8 @@ __all__ = [
283
294
  "MaybeCallablePathLike",
284
295
  "MaybeCallableStr",
285
296
  "MaybeCallableZonedDateTime",
297
+ "MaybeCollection",
298
+ "MaybeCollectionStr",
286
299
  "MaybeCoro",
287
300
  "MaybeIterable",
288
301
  "MaybeIterableHashable",