From 2e79ae826390b62247de6a5fa6b024da6649985b Mon Sep 17 00:00:00 2001 From: Zach Aysan Date: Wed, 4 Dec 2024 15:54:01 +0000 Subject: [PATCH] Filter out mypy failures for site packages --- api/scripts/mypy_check.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/scripts/mypy_check.py b/api/scripts/mypy_check.py index da0c6a532e00..0752a6522445 100644 --- a/api/scripts/mypy_check.py +++ b/api/scripts/mypy_check.py @@ -46,8 +46,8 @@ def main() -> None: with open(baseline_path, "r") as f: baseline = set(line.strip() for line in f if line.strip()) - # Detect new errors and remove information line - current_errors = set(current_output) + # Detect new errors and remove information line filtering out third party packages + current_errors = {line for line in current_output if "site-packages" not in line} new_errors = current_errors - baseline pattern = r"Found (\d+) errors in (\d+) files \(checked (\d+) source files\)" removal = None