root
38
39
40@app.get("/")
41def root():42 return {"message": "Hello From Handvask Backend!"}
result2string
12result = {}
13
14
15def result2string( 16 result: mz.Result, variables: list[str], obj: bool = False, json: bool = False
17):
18 data = {v: result[v] for v in variables if result[v]}
find_solutions
26 return "\n".join(f"{k} = {v};" for k, v in data.items())
27
28
29async def find_solutions( 30 inst: mz.Instance, obj: bool, json: bool, p: int, a: bool, tl: int
31):
32 inst.analyse()
progress
113
114
115@app.post("/progress")
116def progress(id: str = Body(), solver: str = Body(), solution: str = Body()):117 requests.post(
118 BACKEND_URL + "/progress",
119 json={"id": id, "solver": solver, "solution": solution},
solve
60
61# TODO: should have problem, data, and solvers posted
62@app.post("/solve")
63def solve( 64 id: str = Body(),
65 problem: str = Body(),
66 data: str = Body(),
The module/function docstring is missing.
If you want to ignore this, you can configure this in the .deepsource.toml
file. Please refer to docs for available options.