Skip to content

Commit d42aa4f

Browse files
fix: Type checking fixes
1 parent 5c43e32 commit d42aa4f

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

tests/integration/conftest.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
from contextlib import contextmanager, redirect_stdout
2-
from dataclasses import dataclass
3-
import os
4-
from typing import Any, ContextManager, Generator
51
import io
6-
from typing import TextIO
2+
import os
73
import uuid
8-
import pytest
4+
from contextlib import contextmanager, redirect_stdout
5+
from dataclasses import dataclass
6+
from typing import Any, ContextManager, Generator, TextIO
7+
98
import dotenv
9+
import pytest
1010
from humanloop.client import Humanloop
11+
from humanloop.requests.prompt_kernel_request import PromptKernelRequestParams
1112

1213

1314
@dataclass
@@ -55,7 +56,7 @@ def sdk_test_dir(humanloop_test_client: Humanloop) -> Generator[str, None, None]
5556

5657

5758
@pytest.fixture(scope="function")
58-
def test_prompt_config() -> dict[str, Any]:
59+
def test_prompt_config() -> PromptKernelRequestParams:
5960
return {
6061
"provider": "openai",
6162
"model": "gpt-4o-mini",

tests/integration/test_prompts.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from humanloop.client import Humanloop
2+
23
from tests.integration.conftest import TestIdentifiers
34

45

@@ -7,7 +8,7 @@ def test_prompts_call(
78
prompt: TestIdentifiers,
89
test_prompt_config: TestIdentifiers,
910
) -> None:
10-
response = humanloop_test_client.prompts.call(
11+
response = humanloop_test_client.prompts.call( # type: ignore [attr-defined]
1112
path=prompt.file_path,
1213
prompt={**test_prompt_config},
1314
inputs={"question": "What is the capital of the France?"},
@@ -27,7 +28,7 @@ def test_prompts_call_stream(
2728
prompt: TestIdentifiers,
2829
test_prompt_config: TestIdentifiers,
2930
) -> None:
30-
response = humanloop_test_client.prompts.call_stream(
31+
response = humanloop_test_client.prompts.call_stream( # type: ignore [attr-defined]
3132
path=prompt.file_path,
3233
prompt={**test_prompt_config},
3334
inputs={"question": "What is the capital of the France?"},

0 commit comments

Comments
 (0)