hatchet-sdk 1.15.2__py3-none-any.whl → 1.15.3__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.

Potentially problematic release.


This version of hatchet-sdk might be problematic. Click here for more details.

@@ -2,10 +2,7 @@ from typing import Any, TypeVar, cast, overload
2
2
 
3
3
  T = TypeVar("T")
4
4
  K = TypeVar("K")
5
-
6
-
7
- @overload
8
- def remove_null_unicode_character(data: str, replacement: str = "") -> str: ...
5
+ R = TypeVar("R")
9
6
 
10
7
 
11
8
  @overload
@@ -24,9 +21,13 @@ def remove_null_unicode_character(
24
21
  ) -> tuple[T, ...]: ...
25
22
 
26
23
 
24
+ @overload
25
+ def remove_null_unicode_character(data: R, replacement: str = "") -> R: ...
26
+
27
+
27
28
  def remove_null_unicode_character(
28
- data: str | dict[K, T] | list[T] | tuple[T, ...], replacement: str = ""
29
- ) -> str | dict[K, T] | list[T] | tuple[T, ...]:
29
+ data: dict[K, T] | list[T] | tuple[T, ...] | R, replacement: str = ""
30
+ ) -> str | dict[K, T] | list[T] | tuple[T, ...] | R:
30
31
  """
31
32
  Recursively traverse a dictionary (a task's output) and remove the unicode escape sequence \\u0000 which will cause unexpected behavior in Hatchet.
32
33
 
@@ -36,7 +37,6 @@ def remove_null_unicode_character(
36
37
  :param replacement: The string to replace \\u0000 with.
37
38
 
38
39
  :return: The same dictionary with all \\u0000 characters removed from strings, and nested dictionaries/lists processed recursively.
39
- :raises TypeError: If the input is not a string, dictionary, list, or tuple.
40
40
  """
41
41
  if isinstance(data, str):
42
42
  return data.replace("\u0000", replacement)
@@ -57,6 +57,4 @@ def remove_null_unicode_character(
57
57
  remove_null_unicode_character(cast(Any, item), replacement) for item in data
58
58
  )
59
59
 
60
- raise TypeError(
61
- f"Unsupported type {type(data)}. Expected str, dict, list, or tuple."
62
- )
60
+ return data
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hatchet-sdk
3
- Version: 1.15.2
3
+ Version: 1.15.3
4
4
  Summary:
5
5
  License: MIT
6
6
  Author: Alexander Belanger
@@ -283,7 +283,7 @@ hatchet_sdk/utils/backoff.py,sha256=6B5Rb5nLKw_TqqgpJMYjIBV1PTTtbOMRZCveisVhg_I,
283
283
  hatchet_sdk/utils/datetimes.py,sha256=vIZNEX8tt-bknaIuTmoLEmKVt18dBjClH3urYtCJAys,775
284
284
  hatchet_sdk/utils/opentelemetry.py,sha256=64TVwCLrUzEmcL2BUNPV_QubfiR5jajOZtVeGYLnEEA,1226
285
285
  hatchet_sdk/utils/proto_enums.py,sha256=v2gp_ZmIhPxURVXwz5lscllXwZXDl5XGXeL6gezw3o0,1241
286
- hatchet_sdk/utils/serde.py,sha256=YbS9rPy_kSom2G9cgYupECJrt3fbBOSbHVx6ihu7fUU,1924
286
+ hatchet_sdk/utils/serde.py,sha256=5edZsFddc5KjfbBjHVizPKW6PGgzM5guaLQ5FAFrog8,1769
287
287
  hatchet_sdk/utils/timedelta_to_expression.py,sha256=YujnBnGn7lxtkUdKIeqmOiN_ZCGBpRPjCCSzcD3jxzA,644
288
288
  hatchet_sdk/utils/typing.py,sha256=FgYnZyJSoRjNVFodxlI9gn0X8ST1KFed7xfUynIxa2U,978
289
289
  hatchet_sdk/v0/__init__.py,sha256=r3Q7l2RsLgdIkK2jjiz7-JJpD1T_Zy--Oa9MN5n_yEs,9654
@@ -514,7 +514,7 @@ hatchet_sdk/worker/runner/runner.py,sha256=Btz7wd0DQ-5aPEZLN3T5X5__8DjuxN6H4yQEV
514
514
  hatchet_sdk/worker/runner/utils/capture_logs.py,sha256=nJb67Hq-RGiuj0J2eWO-6QxY6ERfl2N3lvVhbj3YDqE,3540
515
515
  hatchet_sdk/worker/worker.py,sha256=nDuRo_LishRuOCTnDonc7G7qeOoW93nRHGd-fQOE_bs,16541
516
516
  hatchet_sdk/workflow_run.py,sha256=KcylcqRwKADtnzOTjoiVr1vdr7qTZFtDeD5aRS6A4Y8,2823
517
- hatchet_sdk-1.15.2.dist-info/METADATA,sha256=tD9g4uoBnymLMT14UM4RFBhuisTaa1aJxwlXvqHY8fo,3636
518
- hatchet_sdk-1.15.2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
519
- hatchet_sdk-1.15.2.dist-info/entry_points.txt,sha256=Un_76pcLse-ZGBlwebhQpnTPyQrripeHW8J7qmEpGOk,1400
520
- hatchet_sdk-1.15.2.dist-info/RECORD,,
517
+ hatchet_sdk-1.15.3.dist-info/METADATA,sha256=gQs7xIpTGRslfHUYDQXtMJ8LgOwFXlBzVZnheeAivoE,3636
518
+ hatchet_sdk-1.15.3.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
519
+ hatchet_sdk-1.15.3.dist-info/entry_points.txt,sha256=Un_76pcLse-ZGBlwebhQpnTPyQrripeHW8J7qmEpGOk,1400
520
+ hatchet_sdk-1.15.3.dist-info/RECORD,,