fix: scripts/ errors

This commit is contained in:
Mason Daugherty
2025-07-28 15:03:25 -04:00
parent e79e0bd6b4
commit 6f10160a45
2 changed files with 12 additions and 10 deletions

View File

@@ -3,11 +3,13 @@ python scripts/release_branch.py anthropic bagatur
"""
import glob
import tomllib
import toml
import subprocess
import sys
# Ignoring errors since this script is run in a controlled environment
import toml # type: ignore # pyright: ignore[reportMissingModuleSource]
import tomllib # type: ignore # pyright: ignore[reportMissingImports]
def main(*args):
pkg = args[1]

View File

@@ -1,12 +1,13 @@
"""python scripts/update_mypy_ruff.py"""
import glob
import tomllib
import re
import subprocess
from pathlib import Path
import toml
import subprocess
import re
# Ignoring errors since this script is run in a controlled environment
import toml # type: ignore # pyright: ignore[reportMissingModuleSource]
import tomllib # type: ignore # pyright: ignore[reportMissingImports]
ROOT_DIR = Path(__file__).parents[1]
@@ -50,10 +51,9 @@ def main():
to_ignore = {}
for l in logs:
if re.match("^(.*)\:(\d+)\: error:.*\[(.*)\]", l):
path, line_no, error_type = re.match(
"^(.*)\:(\d+)\: error:.*\[(.*)\]", l
).groups()
match = re.match(r"^(.*):(\d+): error:.*\[(.*)\]", l)
if match:
path, line_no, error_type = match.groups()
if (path, line_no) in to_ignore:
to_ignore[(path, line_no)].append(error_type)
else: