mmar-mapi 1.0.11__tar.gz → 1.0.13__tar.gz

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 mmar-mapi might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mmar-mapi
3
- Version: 1.0.11
3
+ Version: 1.0.13
4
4
  Summary: Common pure/IO utilities for multi-modal architectures team
5
5
  Keywords:
6
6
  Author: Eugene Tagin
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "mmar-mapi"
3
3
  # dynamic version is not supported yet on uv_build
4
- version = "1.0.11"
4
+ version = "1.0.13"
5
5
  description = "Common pure/IO utilities for multi-modal architectures team"
6
6
  authors = [{name = "Eugene Tagin", email = "tagin@airi.net"}]
7
7
  license = "MIT"
@@ -6,7 +6,7 @@ from pathlib import Path
6
6
  from zipfile import ZipFile, is_zipfile
7
7
 
8
8
  ResourceId = str
9
- ASCII_DIGITS = set(string.ascii_lowercase + string.digits)
9
+ ASCII_DIGITS = set(string.ascii_lowercase + string.digits + '-')
10
10
  SUFFIX_DIR = ".dir"
11
11
  SUFFIX_METADATA = ".metadata"
12
12
 
@@ -185,6 +185,8 @@ class AIMessage(BaseMessage):
185
185
  def action(self) -> str:
186
186
  return (self.extra or {}).get("action", "")
187
187
 
188
+ def with_state(self, state: str) -> "AIMessage":
189
+ return self.model_copy(update=dict(state=state))
188
190
 
189
191
  class MiscMessage(BaseMessage):
190
192
  type: Literal["misc"] = "misc"
@@ -30,7 +30,11 @@ def get_main_object(module: type[ModuleType], obj_type):
30
30
 
31
31
 
32
32
  def load_modules(package_name: str) -> list[type[ModuleType]]:
33
- package = import_module(package_name)
33
+ try:
34
+ package = import_module(package_name)
35
+ except ModuleNotFoundError:
36
+ logger.error(f"Not found module: {package_name}")
37
+ return []
34
38
  res = [import_module(module_name) for _, module_name, _ in iter_modules(package.__path__, package_name + ".")]
35
39
  return res
36
40
 
File without changes
File without changes