mathjson-solver 1.9.0__tar.gz → 1.9.1__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.
- {mathjson_solver-1.9.0/src/mathjson_solver.egg-info → mathjson_solver-1.9.1}/PKG-INFO +1 -1
- {mathjson_solver-1.9.0 → mathjson_solver-1.9.1}/setup.cfg +1 -1
- {mathjson_solver-1.9.0 → mathjson_solver-1.9.1}/setup.py +1 -1
- {mathjson_solver-1.9.0 → mathjson_solver-1.9.1}/src/mathjson_solver/__main__.py +5 -0
- {mathjson_solver-1.9.0 → mathjson_solver-1.9.1/src/mathjson_solver.egg-info}/PKG-INFO +1 -1
- {mathjson_solver-1.9.0 → mathjson_solver-1.9.1}/tests/test_with_pytest.py +15 -0
- {mathjson_solver-1.9.0 → mathjson_solver-1.9.1}/LICENSE +0 -0
- {mathjson_solver-1.9.0 → mathjson_solver-1.9.1}/README.md +0 -0
- {mathjson_solver-1.9.0 → mathjson_solver-1.9.1}/pyproject.toml +0 -0
- {mathjson_solver-1.9.0 → mathjson_solver-1.9.1}/src/mathjson_solver/__init__.py +0 -0
- {mathjson_solver-1.9.0 → mathjson_solver-1.9.1}/src/mathjson_solver.egg-info/SOURCES.txt +0 -0
- {mathjson_solver-1.9.0 → mathjson_solver-1.9.1}/src/mathjson_solver.egg-info/dependency_links.txt +0 -0
- {mathjson_solver-1.9.0 → mathjson_solver-1.9.1}/src/mathjson_solver.egg-info/top_level.txt +0 -0
|
@@ -487,6 +487,11 @@ def extract_variables(s: Union[list, int, float, str], li: set, ignore_list: set
|
|
|
487
487
|
ignore_list.add(x[0])
|
|
488
488
|
li.update(extract_variables(x[1], li, ignore_list))
|
|
489
489
|
li.update(extract_variables(x[-1], li, ignore_list))
|
|
490
|
+
elif s[0] == "If":
|
|
491
|
+
for elif_block in s[1:-1]: # s[1] is list
|
|
492
|
+
for x in elif_block:
|
|
493
|
+
li.update(extract_variables(x, li, ignore_list))
|
|
494
|
+
li.update(extract_variables(s[-1], li, ignore_list))
|
|
490
495
|
else:
|
|
491
496
|
for x in s[1:]:
|
|
492
497
|
li.update(extract_variables(x, li, ignore_list))
|
|
@@ -319,6 +319,21 @@ def test_handle_exception():
|
|
|
319
319
|
["Add", "[slug1][0][question1]", "y", 4, "[slug1][-3:-1][question1]"],
|
|
320
320
|
set(["[slug1][0][question1]", "y", "[slug1][-3:-1][question1]"]),
|
|
321
321
|
),
|
|
322
|
+
(
|
|
323
|
+
{},
|
|
324
|
+
["If", [["Equal", "[uzwuoy][-1][question1]", 200], 200], 1],
|
|
325
|
+
set(["[uzwuoy][-1][question1]"]),
|
|
326
|
+
),
|
|
327
|
+
(
|
|
328
|
+
{},
|
|
329
|
+
[
|
|
330
|
+
"If",
|
|
331
|
+
[["Equal", "[uzwuoy][-1][question1]", 200], 201],
|
|
332
|
+
[["Equal", "[uzwuoy][-2][question1]", 100], 101],
|
|
333
|
+
1,
|
|
334
|
+
],
|
|
335
|
+
set(["[uzwuoy][-1][question1]", "[uzwuoy][-2][question1]"]),
|
|
336
|
+
),
|
|
322
337
|
],
|
|
323
338
|
)
|
|
324
339
|
def test_extract_variables(parameters, expression, expected_result):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mathjson_solver-1.9.0 → mathjson_solver-1.9.1}/src/mathjson_solver.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|