infra: add -p to mkdir in lint steps (#17013)

Previously, if this did not find a mypy cache then it wouldnt run

this makes it always run

adding mypy ignore comments with existing uncaught issues to unblock other prs

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
This commit is contained in:
Harrison Chase
2024-02-05 11:22:06 -08:00
committed by GitHub
parent db6af21395
commit 4eda647fdd
103 changed files with 378 additions and 369 deletions

View File

@@ -62,7 +62,7 @@ lint lint_diff lint_package lint_tests:
poetry run ruff .
[ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
[ "$(PYTHON_FILES)" = "" ] || poetry run ruff --select I $(PYTHON_FILES)
[ "$(PYTHON_FILES)" = "" ] || mkdir $(MYPY_CACHE) || poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
[ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
[ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)

View File

@@ -210,7 +210,7 @@ class OpenAIAssistantRunnable(RunnableSerializable[Dict, OutputType]):
assistant = client.beta.assistants.create(
name=name,
instructions=instructions,
tools=[convert_to_openai_tool(tool) for tool in tools],
tools=[convert_to_openai_tool(tool) for tool in tools], # type: ignore
model=model,
)
return cls(assistant_id=assistant.id, client=client, **kwargs)
@@ -331,7 +331,7 @@ class OpenAIAssistantRunnable(RunnableSerializable[Dict, OutputType]):
assistant = await async_client.beta.assistants.create(
name=name,
instructions=instructions,
tools=openai_tools,
tools=openai_tools, # type: ignore
model=model,
)
return cls(assistant_id=assistant.id, async_client=async_client, **kwargs)

View File

@@ -52,7 +52,7 @@ class OpenAIModerationChain(Chain):
openai.api_key = openai_api_key
if openai_organization:
openai.organization = openai_organization
values["client"] = openai.Moderation
values["client"] = openai.Moderation # type: ignore
except ImportError:
raise ImportError(
"Could not import openai python package. "