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

@@ -297,7 +297,7 @@ class _OllamaCommon(BaseLanguageModel):
"Ollama call failed with status code 404."
)
else:
optional_detail = await response.json().get("error")
optional_detail = await response.json().get("error") # type: ignore[attr-defined]
raise ValueError(
f"Ollama call failed with status code {response.status}."
f" Details: {optional_detail}"
@@ -380,7 +380,7 @@ class Ollama(BaseLLM, _OllamaCommon):
"""Return type of llm."""
return "ollama-llm"
def _generate(
def _generate( # type: ignore[override]
self,
prompts: List[str],
stop: Optional[List[str]] = None,
@@ -416,7 +416,7 @@ class Ollama(BaseLLM, _OllamaCommon):
generations.append([final_chunk])
return LLMResult(generations=generations)
async def _agenerate(
async def _agenerate( # type: ignore[override]
self,
prompts: List[str],
stop: Optional[List[str]] = None,
@@ -445,7 +445,7 @@ class Ollama(BaseLLM, _OllamaCommon):
prompt,
stop=stop,
images=images,
run_manager=run_manager,
run_manager=run_manager, # type: ignore[arg-type]
verbose=self.verbose,
**kwargs,
)