INNER CODE UNIT · Python
shell_rows
yaojingang/GEOFlow · scripts/audit-admin-ui-v3-flicker.py:76
def shell_rows(matrix_path: Path) -> list[dict[str, str]]:
with matrix_path.open(encoding="utf-8-sig", newline="") as handle:
return [row for row in csv.DictReader(handle) if row["page_type"] == "V3 公共壳层"]
def delta(first: dict | None, final: dict | None, key: str) -> float | None:
if not first or not final:
return None
return round(abs(float(first[key]) - float(final[key])), 3)
def is_unexpected_console_error(message: str) -> bool:
return not any(diagnostic in message for diagnostic in EXPECTED_BROWSER_DIAGNOSTICS)
def audit_url(base_url: str, recorded_url: str) -> str:
base = urlparse(base_url)
recorded = urlparse(recorded_url)