mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-02 19:47:13 +00:00
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:
@@ -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:
|
||||
|
Reference in New Issue
Block a user