Skip to content

Commit 6d6f4a3

Browse files
Fix test imports with proper relative imports, remove pythonPath
- Use relative imports (.utils, ..utils, ...utils) based on directory depth - Remove pythonPath from pyproject.toml (no longer needed) - All test imports now resolve correctly - Reduced typing errors from 158 to 150
1 parent c8b68de commit 6d6f4a3

File tree

9 files changed

+8
-9
lines changed

9 files changed

+8
-9
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ filterwarnings = [
179179
# Default to basic type checking, but override for specific directories
180180
typeCheckingMode = "basic"
181181
pythonVersion = "3.12"
182-
pythonPath = ["."]
183182

184183
exclude = [
185184
"_dev",

tests/api_resources/messages/test_batch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import pytest
99

1010
from agentex import Agentex, AsyncAgentex
11-
from tests.utils import assert_matches_type
11+
from ...utils import assert_matches_type
1212
from agentex.types.messages import BatchCreateResponse, BatchUpdateResponse
1313

1414
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")

tests/api_resources/test_agents.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import pytest
99

1010
from agentex import Agentex, AsyncAgentex
11-
from tests.utils import assert_matches_type
11+
from ..utils import assert_matches_type
1212
from agentex.types import (
1313
Agent,
1414
AgentRpcResponse,

tests/api_resources/test_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import pytest
99

1010
from agentex import Agentex, AsyncAgentex
11-
from tests.utils import assert_matches_type
11+
from ..utils import assert_matches_type
1212
from agentex.types import Event, EventListResponse
1313

1414
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")

tests/api_resources/test_messages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import pytest
99

1010
from agentex import Agentex, AsyncAgentex
11-
from tests.utils import assert_matches_type
11+
from ..utils import assert_matches_type
1212
from agentex.types import (
1313
TaskMessage,
1414
MessageListResponse,

tests/api_resources/test_spans.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import pytest
99

1010
from agentex import Agentex, AsyncAgentex
11-
from tests.utils import assert_matches_type
11+
from ..utils import assert_matches_type
1212
from agentex.types import Span, SpanListResponse
1313
from agentex._utils import parse_datetime
1414

tests/api_resources/test_states.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import pytest
99

1010
from agentex import Agentex, AsyncAgentex
11-
from tests.utils import assert_matches_type
11+
from ..utils import assert_matches_type
1212
from agentex.types import State, StateListResponse
1313

1414
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")

tests/api_resources/test_tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import pytest
99

1010
from agentex import Agentex, AsyncAgentex
11-
from tests.utils import assert_matches_type
11+
from ..utils import assert_matches_type
1212
from agentex.types import Task, TaskListResponse
1313
from agentex.types.shared import DeleteResponse
1414

tests/api_resources/test_tracker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import pytest
99

1010
from agentex import Agentex, AsyncAgentex
11-
from tests.utils import assert_matches_type
11+
from ..utils import assert_matches_type
1212
from agentex.types import AgentTaskTracker, TrackerListResponse
1313

1414
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")

0 commit comments

Comments
 (0)