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

@@ -37,12 +37,12 @@ class BedrockAsyncCallbackHandler(AsyncCallbackHandler):
if reason == "GUARDRAIL_INTERVENED":
self.guardrails_intervened = True
def get_response(self):
def get_response(self): # type: ignore[no-untyped-def]
return self.guardrails_intervened
@pytest.fixture(autouse=True)
def bedrock_runtime_client():
def bedrock_runtime_client(): # type: ignore[no-untyped-def]
import boto3
try:
@@ -56,7 +56,7 @@ def bedrock_runtime_client():
@pytest.fixture(autouse=True)
def bedrock_client():
def bedrock_client(): # type: ignore[no-untyped-def]
import boto3
try:
@@ -70,7 +70,7 @@ def bedrock_client():
@pytest.fixture
def bedrock_models(bedrock_client):
def bedrock_models(bedrock_client): # type: ignore[no-untyped-def]
"""List bedrock models."""
response = bedrock_client.list_foundation_models().get("modelSummaries")
models = {}
@@ -79,7 +79,7 @@ def bedrock_models(bedrock_client):
return models
def test_claude_instant_v1(bedrock_runtime_client, bedrock_models):
def test_claude_instant_v1(bedrock_runtime_client, bedrock_models): # type: ignore[no-untyped-def]
try:
llm = Bedrock(
model_id="anthropic.claude-instant-v1",
@@ -92,7 +92,7 @@ def test_claude_instant_v1(bedrock_runtime_client, bedrock_models):
pytest.fail(f"can not instantiate claude-instant-v1: {e}", pytrace=False)
def test_amazon_bedrock_guardrails_no_intervention_for_valid_query(
def test_amazon_bedrock_guardrails_no_intervention_for_valid_query( # type: ignore[no-untyped-def]
bedrock_runtime_client, bedrock_models
):
try:
@@ -112,7 +112,7 @@ def test_amazon_bedrock_guardrails_no_intervention_for_valid_query(
pytest.fail(f"can not instantiate claude-instant-v1: {e}", pytrace=False)
def test_amazon_bedrock_guardrails_intervention_for_invalid_query(
def test_amazon_bedrock_guardrails_intervention_for_invalid_query( # type: ignore[no-untyped-def]
bedrock_runtime_client, bedrock_models
):
try: