Skip to content

Commit 60cbe38

Browse files
Make the type compliant with RunResponse
1 parent 0d815ce commit 60cbe38

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

backend/src/acidwatch_api/models/phpitz.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,16 @@ async def run(self) -> RunResult:
6767
res.raise_for_status()
6868

6969
result = res.text.replace("\\n", "\n").strip("'")
70-
concentrations_dict = self.parse_phpitz_simple(
70+
parsed_data = self.parse_phpitz_simple(
7171
result[result.find("FINISH") : result.find("\n \n \n")]
7272
)
7373

74-
return (concentrations_dict, TextResult(data=result))
74+
final_concentrations: dict[str, float] = {
75+
component: data["end_ppm"] for component, data in parsed_data.items()
76+
}
77+
78+
print(final_concentrations, parsed_data)
79+
return (final_concentrations, TextResult(data=result))
7580

7681
@staticmethod
7782
def parse_phpitz_simple(text: str) -> dict[str, dict[str, float]]:

0 commit comments

Comments
 (0)