Skip to content

Commit b36764d

Browse files
committed
Linting and old python version typing import
1 parent 28697b9 commit b36764d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/agents/model_settings.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
from __future__ import annotations
22

33
import dataclasses
4+
from collections.abc import Mapping
45
from dataclasses import dataclass, fields, replace
5-
from typing import Any, Literal, Annotated, TypeAlias, Mapping
6+
from typing import Annotated, Any, Literal
67

78
from openai import Omit as _Omit
89
from openai._types import Body, Query
910
from openai.types.responses import ResponseIncludable
1011
from openai.types.shared import Reasoning
1112
from pydantic import BaseModel, GetCoreSchemaHandler
1213
from pydantic_core import core_schema
14+
from typing_extensions import TypeAlias
15+
1316

1417
class _OmitTypeAnnotation:
1518
@classmethod

tests/model_settings/test_serialization.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from openai.types.shared import Reasoning
55
from pydantic import TypeAdapter
66
from pydantic_core import to_json
7+
78
from agents.model_settings import ModelSettings
89

910

@@ -161,4 +162,4 @@ def test_pydantic_serialization() -> None:
161162
json = to_json(model_settings)
162163
deserialized = TypeAdapter(ModelSettings).validate_json(json)
163164

164-
assert model_settings == deserialized
165+
assert model_settings == deserialized

0 commit comments

Comments
 (0)