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.
@@ -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, "w", encoding=encoding) as file:
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
@@ -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):
@@ -1 +1 @@
1
- 0.3.15
1
+ 0.3.16