bear-utils 0.9.9__py3-none-any.whl → 0.9.10__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 +1 @@
1
- __version__ = "0.9.9"
1
+ __version__ = "0.9.10"
@@ -4,7 +4,7 @@ from collections import defaultdict
4
4
  from collections.abc import Callable
5
5
  from functools import wraps
6
6
  from types import MethodType
7
- from typing import Any
7
+ from typing import Any, Literal, overload
8
8
  import weakref
9
9
  from weakref import WeakMethod, ref
10
10
 
@@ -44,6 +44,14 @@ def set_handler(name: str, func: Callback) -> None:
44
44
  _event_registry[name].add(ref(func, _make_callback(name)))
45
45
 
46
46
 
47
+ @overload
48
+ def dispatch_event(name: str, single: Literal[True], *args, **kwargs) -> Any: ...
49
+
50
+
51
+ @overload
52
+ def dispatch_event(name: str, single: Literal[False] = False, *args, **kwargs) -> list[Any]: ...
53
+
54
+
47
55
  def dispatch_event(name: str, single: bool = False, *args, **kwargs) -> list[Any]:
48
56
  """Dispatch an event to all registered handlers."""
49
57
  results: list[Any] = []
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bear-utils
3
- Version: 0.9.9
3
+ Version: 0.9.10
4
4
  Summary: Various utilities for Bear programmers, including a rich logging utility, a disk cache, and a SQLite database wrapper amongst other things.
5
5
  Author-email: chaz <bright.lid5647@fastmail.com>
6
6
  Requires-Python: >=3.12
@@ -1,7 +1,7 @@
1
1
  bear_utils/__init__.py,sha256=Cin66XUC7cwuJ7ePZwgfdDnwFFPX_CHXOI3dMBWuyY8,1515
2
2
  bear_utils/__main__.py,sha256=-FlPquBlI1Tg2RoeX6d0Z8jTAiMFnJ0V06ZeRyiq58k,355
3
3
  bear_utils/_internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- bear_utils/_internal/_version.py,sha256=nhsA3KKA-CXSYpbzuChuLyxpDepY_-JffnUNClcYEaU,22
4
+ bear_utils/_internal/_version.py,sha256=5nY2lKMmQwtU8FXTQ2Qpv9EUNfy2UJF9cHFr82n7ARw,23
5
5
  bear_utils/_internal/cli.py,sha256=GWVpdNxtb54EwiJPp4lync7M-hjo8hqVoVB7RFItXaA,4457
6
6
  bear_utils/_internal/debug.py,sha256=mpjGkoAHutSmkyPuHk8QA2xCI0ttPkqs8tQtpjFcVqw,5977
7
7
  bear_utils/ai/__init__.py,sha256=Q5P1KpSYS6iMt3vRbmasdWU5Oy5UkXfOGGyDI7Qy3Po,747
@@ -37,7 +37,7 @@ bear_utils/database/__init__.py,sha256=dS_HHJKESpsI6BFDLVx055o0GCJV9CMYOQVuHs7Ef
37
37
  bear_utils/database/_db_manager.py,sha256=bbg5zG06DcOvd37oafLIqc480BwF9ZW9qWF3ldZHR8o,3805
38
38
  bear_utils/events/__init__.py,sha256=EFqmuzhaEYK9kjkGlrM7bjdjPwFEDbKn6RjJKfIBEJY,414
39
39
  bear_utils/events/events_class.py,sha256=Rzvw-TuX8Tpaf_D0A50fwKiV73BLCKpBTH6Dp08eg3I,2161
40
- bear_utils/events/events_module.py,sha256=zXl3MB5VtITBCvCRHMRwfCrBkx8GkcH8k1aeB2w9Tnc,2436
40
+ bear_utils/events/events_module.py,sha256=KIDUHKA9Pq0GDATovBmWFu0SDo5c9zltew3Ult1mKcw,2658
41
41
  bear_utils/extras/__init__.py,sha256=0mz3ZYOkOcW_tUHSx2pV2mtCfyuXwgPe9SYXEqlGHsg,755
42
42
  bear_utils/extras/_async_helpers.py,sha256=iTLIJlME5Ifeqy6Y_0kNWAihc2oHCN57U6gehov1aDg,3340
43
43
  bear_utils/extras/_tools.py,sha256=cY5XxtUgeJxomeLO_g0X0xX_vEhMrvJkVd4I3-psjaw,6068
@@ -102,6 +102,6 @@ bear_utils/monitoring/__init__.py,sha256=9DKNIWTp_voLnaWgiP-wJ-o_N0hYixo-MzjUmg8
102
102
  bear_utils/monitoring/_common.py,sha256=LYQFxgTP9fk0cH71IQTuGwBYYPWCqHP_mMRNecoD76M,657
103
103
  bear_utils/monitoring/host_monitor.py,sha256=e0TYRJw9iDj5Ga6y3ck1TBFEeH42Cax5mQYaNU8yams,13241
104
104
  bear_utils/time/__init__.py,sha256=VctjJG17SyEHAFXytI1sZrOrq7zm3hVenIDOJFdaMN0,1424
105
- bear_utils-0.9.9.dist-info/METADATA,sha256=P8iMvX60OVd18V56xwJL7dzZNaqFVxsmfvVIRzLM_30,8800
106
- bear_utils-0.9.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
107
- bear_utils-0.9.9.dist-info/RECORD,,
105
+ bear_utils-0.9.10.dist-info/METADATA,sha256=r10ECXDy6almKKC_AOXlrk7bq5qiUJOc3xE3Ai9K_m8,8801
106
+ bear_utils-0.9.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
107
+ bear_utils-0.9.10.dist-info/RECORD,,