mm-std 0.1.13__py3-none-any.whl → 0.1.14__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.
mm_std/json_.py
CHANGED
@@ -30,8 +30,8 @@ class CustomJSONEncoder(JSONEncoder):
|
|
30
30
|
if isinstance(o, Exception):
|
31
31
|
return str(o)
|
32
32
|
|
33
|
-
return
|
33
|
+
return super().default(o)
|
34
34
|
|
35
35
|
|
36
|
-
def json_dumps(data: object, default: Callable[[object], str] | None =
|
36
|
+
def json_dumps(data: object, default: Callable[[object], str] | None = str) -> str:
|
37
37
|
return json.dumps(data, cls=CustomJSONEncoder, default=default)
|
mm_std/print_.py
CHANGED
@@ -40,7 +40,7 @@ def print_plain(messages: object, print_format: PrintFormat | None = None) -> No
|
|
40
40
|
print(messages) # noqa: T201
|
41
41
|
|
42
42
|
|
43
|
-
def print_json(data: object, default: Callable[[object], str] | None =
|
43
|
+
def print_json(data: object, default: Callable[[object], str] | None = str, print_format: PrintFormat | None = None) -> None:
|
44
44
|
if print_format is None or print_format == PrintFormat.JSON:
|
45
45
|
rich.print_json(json_dumps(data, default=default))
|
46
46
|
|
@@ -8,16 +8,16 @@ mm_std/dict.py,sha256=kJBPVG9vEqHiSgKKoji8gVGL1yEBbxAmFNn0zz17AUg,180
|
|
8
8
|
mm_std/env.py,sha256=5zaR9VeIfObN-4yfgxoFeU5IM1GDeZZj9SuYf7t9sOA,125
|
9
9
|
mm_std/fs.py,sha256=RwarNRJq3tIMG6LVX_g03hasfYpjYFh_O27oVDt5IPQ,291
|
10
10
|
mm_std/http_.py,sha256=QaPPXVb-rOS0BpoKdYQ0ABm_-mcR5dNa7Uqn-SeW_kE,4119
|
11
|
-
mm_std/json_.py,sha256=
|
11
|
+
mm_std/json_.py,sha256=jAL-JrSMPIwxu3y87xNoTcwhOOEHGHrTpX1BTj44Uhw,1091
|
12
12
|
mm_std/log.py,sha256=6ux6njNKc_ZCQlvWn1FZR6vcSY2Cem-mQzmNXvsg5IE,913
|
13
13
|
mm_std/net.py,sha256=qdRCBIDneip6FaPNe5mx31UtYVmzqam_AoUF7ydEyjA,590
|
14
|
-
mm_std/print_.py,sha256=
|
14
|
+
mm_std/print_.py,sha256=w6qXqR7iNhFtrbOBDY11B579VzuUudOLz61liUM-pww,1691
|
15
15
|
mm_std/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
16
|
mm_std/random_.py,sha256=OuUX4VJeSd13NZBya4qrGpR2TfN7_87tfebOY6DBUnI,1113
|
17
17
|
mm_std/result.py,sha256=KtYZbVJMkwwCPcV-Tnt0TkTNyDgiALvQB1DtIEp1prc,7405
|
18
18
|
mm_std/str.py,sha256=jS7VAI7i_a3iqnfaW4Iw2LZRTv0Tml4kmMbP2S2IUF4,3067
|
19
19
|
mm_std/types_.py,sha256=hvZlnvBWyB8CL_MeEWWD0Y0nN677plibYn3yD-5g7xs,99
|
20
20
|
mm_std/zip.py,sha256=2EXcae4HO5U4kObj2Lj8jl5F2OUpT-WRlJybTyFzt6I,370
|
21
|
-
mm_std-0.1.
|
22
|
-
mm_std-0.1.
|
23
|
-
mm_std-0.1.
|
21
|
+
mm_std-0.1.14.dist-info/METADATA,sha256=hlTbkE6A5eGvwWSZ_KI4zCfTHD1jiR4J_8AXZuyh71E,307
|
22
|
+
mm_std-0.1.14.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
23
|
+
mm_std-0.1.14.dist-info/RECORD,,
|
File without changes
|