tensorneko-util 0.3.15__py3-none-any.whl → 0.3.16__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.
- tensorneko_util/io/json/json_writer.py +1 -1
- tensorneko_util/util/registry.py +2 -2
- tensorneko_util/version.txt +1 -1
- tensorneko_util/visualization/watcher/web/dist/assets/{index.9f626faa.js → index.ae750248.js} +25 -25
- tensorneko_util/visualization/watcher/web/dist/index.html +1 -1
- {tensorneko_util-0.3.15.dist-info → tensorneko_util-0.3.16.dist-info}/METADATA +3 -4
- {tensorneko_util-0.3.15.dist-info → tensorneko_util-0.3.16.dist-info}/RECORD +10 -10
- {tensorneko_util-0.3.15.dist-info → tensorneko_util-0.3.16.dist-info}/WHEEL +1 -1
- {tensorneko_util-0.3.15.dist-info → tensorneko_util-0.3.16.dist-info}/LICENSE +0 -0
- {tensorneko_util-0.3.15.dist-info → tensorneko_util-0.3.16.dist-info}/top_level.txt +0 -0
|
@@ -14,7 +14,7 @@ class JsonWriter:
|
|
|
14
14
|
json.dump(obj, file, indent=indent, ensure_ascii=ensure_ascii)
|
|
15
15
|
else:
|
|
16
16
|
import orjson
|
|
17
|
-
with open(path, "
|
|
17
|
+
with open(path, "wb") as file:
|
|
18
18
|
if indent == 4:
|
|
19
19
|
warnings.warn("orjson does not support indent 4, will use indent 2 instead.")
|
|
20
20
|
option = orjson.OPT_INDENT_2
|
tensorneko_util/util/registry.py
CHANGED
|
@@ -28,7 +28,7 @@ class Registry(Generic[T]):
|
|
|
28
28
|
"""
|
|
29
29
|
|
|
30
30
|
def __init__(self):
|
|
31
|
-
self._registry: dict[str, T] = {}
|
|
31
|
+
self._registry: dict[str, Type[T]] = {}
|
|
32
32
|
|
|
33
33
|
def register(self, name: str) -> Callable[[Type[T]], Type[T]]:
|
|
34
34
|
def wrapper(cls):
|
|
@@ -37,7 +37,7 @@ class Registry(Generic[T]):
|
|
|
37
37
|
|
|
38
38
|
return wrapper
|
|
39
39
|
|
|
40
|
-
def __getitem__(self, name: str) -> T:
|
|
40
|
+
def __getitem__(self, name: str) -> Type[T]:
|
|
41
41
|
return self._registry[name]
|
|
42
42
|
|
|
43
43
|
def items(self):
|
tensorneko_util/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.3.
|
|
1
|
+
0.3.16
|