Initial import: eCW Charge Validation bot and results Portal
Snapshot of the working project as of 2026-10-23 (local 2d4d4fc), one commit with no earlier history: the tracked files were de-identified first (synthetic claim ids and patient data only; see Context.md section 7). Credentials, run logs, screenshots, claim reports and client workbooks are gitignored and not included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
ba15a574ab
205 files changed
+56772
No files matched your search
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
core/text.py — small text helpers shared by core/, conditions/ and flows/.
|
||||
|
||||
Lives in core/ because core/ must not import from conditions/, pages/ or
|
||||
flows/, and all three need it (review of unit D, 2026-10-05: the condition
|
||||
runner, the Charge Summary and the flow each had their own copy).
|
||||
"""
|
||||
|
||||
|
||||
def first_line(value) -> str:
|
||||
"""
|
||||
The first non-blank line of `value`'s text, stripped.
|
||||
|
||||
For an exception: Playwright's messages carry a whole call log after the
|
||||
first line, which is all a log line or a summary cell wants. An exception
|
||||
with an empty message gives its class name instead — a bare
|
||||
`str(exc).splitlines()[0]` raises IndexError on one. Any other empty
|
||||
value (an error string that came back blank) gives "".
|
||||
"""
|
||||
lines = str(value).strip().splitlines()
|
||||
if lines:
|
||||
return lines[0].strip()
|
||||
return type(value).__name__ if isinstance(value, BaseException) else ""
|
||||
Reference in new issue
Block a user