Skip to content

Commit 598c7ab

Browse files
authored
Make WalkJsonSchema private (#1490)
1 parent 044ca13 commit 598c7ab

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

pydantic_ai_slim/pydantic_ai/models/json_schema.py renamed to pydantic_ai_slim/pydantic_ai/models/_json_schema.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111

1212
@dataclass(init=False)
1313
class WalkJsonSchema(ABC):
14-
"""Walks a JSON schema, applying transformations to it at each level."""
14+
"""Walks a JSON schema, applying transformations to it at each level.
15+
16+
Note: We may eventually want to rework tools to build the JSON schema from the type directly, using a subclass of
17+
pydantic.json_schema.GenerateJsonSchema, rather than making use of this machinery.
18+
"""
1519

1620
def __init__(
1721
self, schema: JsonSchema, *, prefer_inlined_defs: bool = False, simplify_nullable_unions: bool = False

pydantic_ai_slim/pydantic_ai/models/gemini.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
check_allow_model_requests,
4545
get_user_agent,
4646
)
47-
from .json_schema import JsonSchema, WalkJsonSchema
47+
from ._json_schema import JsonSchema, WalkJsonSchema
4848

4949
LatestGeminiModelNames = Literal[
5050
'gemini-1.5-flash',

pydantic_ai_slim/pydantic_ai/models/openai.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
check_allow_model_requests,
4343
get_user_agent,
4444
)
45-
from .json_schema import JsonSchema, WalkJsonSchema
45+
from ._json_schema import JsonSchema, WalkJsonSchema
4646

4747
try:
4848
from openai import NOT_GIVEN, APIStatusError, AsyncOpenAI, AsyncStream, NotGiven

0 commit comments

Comments
 (0)