mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-03 12:07:36 +00:00
fix: scripts/
errors
This commit is contained in:
@@ -3,11 +3,13 @@ python scripts/release_branch.py anthropic bagatur
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import glob
|
import glob
|
||||||
import tomllib
|
|
||||||
import toml
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
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):
|
def main(*args):
|
||||||
pkg = args[1]
|
pkg = args[1]
|
||||||
|
@@ -1,12 +1,13 @@
|
|||||||
"""python scripts/update_mypy_ruff.py"""
|
"""python scripts/update_mypy_ruff.py"""
|
||||||
|
|
||||||
import glob
|
import glob
|
||||||
import tomllib
|
import re
|
||||||
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import toml
|
# Ignoring errors since this script is run in a controlled environment
|
||||||
import subprocess
|
import toml # type: ignore # pyright: ignore[reportMissingModuleSource]
|
||||||
import re
|
import tomllib # type: ignore # pyright: ignore[reportMissingImports]
|
||||||
|
|
||||||
ROOT_DIR = Path(__file__).parents[1]
|
ROOT_DIR = Path(__file__).parents[1]
|
||||||
|
|
||||||
@@ -50,10 +51,9 @@ def main():
|
|||||||
|
|
||||||
to_ignore = {}
|
to_ignore = {}
|
||||||
for l in logs:
|
for l in logs:
|
||||||
if re.match("^(.*)\:(\d+)\: error:.*\[(.*)\]", l):
|
match = re.match(r"^(.*):(\d+): error:.*\[(.*)\]", l)
|
||||||
path, line_no, error_type = re.match(
|
if match:
|
||||||
"^(.*)\:(\d+)\: error:.*\[(.*)\]", l
|
path, line_no, error_type = match.groups()
|
||||||
).groups()
|
|
||||||
if (path, line_no) in to_ignore:
|
if (path, line_no) in to_ignore:
|
||||||
to_ignore[(path, line_no)].append(error_type)
|
to_ignore[(path, line_no)].append(error_type)
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user