syntaxmatrix 2.3.5__py3-none-any.whl → 2.5.5.5__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.
@@ -0,0 +1,37 @@
1
+ # syntaxmatrix/code_tools_registry.py
2
+ from typing import Dict, Any
3
+ from .agent_tools import CodeTool
4
+ from ..utils import (
5
+ strip_python_dotenv, fix_predict_calls_records_arg, fix_values_sum_numeric_only_bug,
6
+ fix_fstring_backslash_paths, ensure_os_import, fix_numeric_sum, ensure_os_import,
7
+ fix_numeric_sum, fix_concat_empty_list, fix_confusion_matrix_for_multilabel
8
+ )
9
+
10
+ def _wrap(fn):
11
+ return lambda code, ctx: fn(code)
12
+
13
+ # 1) early sanitiser
14
+ EARLY_SANITIZERS = [
15
+ CodeTool("strip_dotenv", "sanitize_early", _wrap(strip_python_dotenv), priority=0),
16
+ ]
17
+
18
+ # 2) Domain and Plotting patches
19
+ DOMAIN_AND_PLOTTING_PATCHES = [
20
+
21
+ ]
22
+
23
+ # 3) syntax/data fixers
24
+ SYNTAX_AND_REPAIR = [
25
+ CodeTool("fix_predict_records", "syntax_fixes", _wrap(fix_predict_calls_records_arg), priority=10),
26
+ CodeTool("fix_values_sum_bug", "syntax_fixes", _wrap(fix_values_sum_numeric_only_bug), priority=20),
27
+ CodeTool("fix_fstring_paths", "syntax_fixes", _wrap(fix_fstring_backslash_paths), priority=30),
28
+ CodeTool("ensure_os_import", "syntax_fixes", _wrap(ensure_os_import), priority=40),
29
+ CodeTool("fix_numeric_sum", "syntax_fixes", _wrap(fix_numeric_sum), priority=50),
30
+ CodeTool("fix_concat_empty_list", "syntax_fixes", _wrap(fix_concat_empty_list), priority=60),
31
+ CodeTool("fix_cm_multilabel", "syntax_fixes", _wrap(fix_confusion_matrix_for_multilabel), priority=65),
32
+ ]
33
+
34
+ # 4) final SANITIZERS catch-all
35
+ FINAL_SANITIZERS = [
36
+ # CodeTool("repair_cell", "final_repair", _wrap(_smx_repair_python_cell), priority=999),
37
+ ]