Merged in bugfix/table-failed-files (pull request #445)
Bugfix/table failed files * improved align and format table prompt * Successful E2E test on San Joaquin - without running align and format table prompt * San Joaquin e2e test passed * Merged main into bugfix/table-error-fix * Merge branch 'main' into bugfix/table-error-fix * Add same number of columns condition * Merged main into bugfix/table-error-fix * Clean investment_values * Remove import * docstrings * Remove test doc * Add back original ALIGN_AND_FORMAT_TABLES prompt for client work * Remove import * Add config reference * expected string or bytes-like object, got 'int' * Merged main into bugfix/table-error-fix * Merge branch 'bugfix/table-error-fix' into bugfix/table-failed-files * Update universal json load * update test * Merge branch 'main' into bugfix/table-failed-files * Position 0 error fixed * update table_utils * remove test.py * revert table_utils test * remove table_utils_test Approved-by: Alex Galarce
This commit is contained in:
committed by
Alex Galarce
parent
86db2ea0b7
commit
31b2936ae6
@@ -225,7 +225,8 @@ def primary_string_to_dict(string_dict, filename):
|
||||
return data
|
||||
|
||||
def universal_json_load(string_dict):
|
||||
match = re.search(r'\{.*\}|\[.*\]', string_dict, re.DOTALL)
|
||||
"""Matches json dicts and list of dicts - NOT simple lists"""
|
||||
match = re.search(r'\{.*\}|\[\{.*\}\]', string_dict, re.DOTALL)
|
||||
if match:
|
||||
try:
|
||||
return json.loads(match.group())
|
||||
@@ -233,7 +234,6 @@ def universal_json_load(string_dict):
|
||||
pass
|
||||
raise ValueError("No valid JSON object found in the input string")
|
||||
|
||||
|
||||
reimbursement_strings = [ # These are for `method='keyword'`
|
||||
"%",
|
||||
"$",
|
||||
|
||||
Reference in New Issue
Block a user