ruff: more rules across the board & fixes (#31898)

* standardizes ruff dep version across all `pyproject.toml` files
* cli: ruff rules and corrections
* langchain: rules and corrections
This commit is contained in:
Mason Daugherty
2025-07-07 17:48:01 -04:00
committed by GitHub
parent 706a66eccd
commit e7eac27241
408 changed files with 2783 additions and 1671 deletions

View File

@@ -122,7 +122,9 @@ def parse_dependencies(
api_path: list[str],
) -> list[DependencySource]:
num_deps = max(
len(dependencies) if dependencies is not None else 0, len(repo), len(branch)
len(dependencies) if dependencies is not None else 0,
len(repo),
len(branch),
)
if (
(dependencies and len(dependencies) != num_deps)
@@ -143,7 +145,10 @@ def parse_dependencies(
return [
parse_dependency_string(iter_dep, iter_repo, iter_branch, iter_api_path)
for iter_dep, iter_repo, iter_branch, iter_api_path in zip(
inner_deps, inner_repos, inner_branches, inner_api_paths
inner_deps,
inner_repos,
inner_branches,
inner_api_paths,
)
]
@@ -186,7 +191,7 @@ def copy_repo(
source: Path,
destination: Path,
) -> None:
"""Copies a repo, ignoring git folders.
"""Copiy a repo, ignoring git folders.
Raises FileNotFound error if it can't find source
"""