Skip to content

Commit 5a1faf7

Browse files
conradleeclaude
andcommitted
Remove unnecessary __init__ override in GoogleJsonSchemaTransformer
The __init__ method was just calling super().__init__() with the same parameters, providing no additional functionality. The base class defaults are exactly what we need: - prefer_inlined_defs defaults to False (native $ref/$defs support) - simplify_nullable_unions defaults to False (type: 'null' support) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 88be4f8 commit 5a1faf7

File tree

1 file changed

+0
-5
lines changed
  • pydantic_ai_slim/pydantic_ai/profiles

1 file changed

+0
-5
lines changed

pydantic_ai_slim/pydantic_ai/profiles/google.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ class GoogleJsonSchemaTransformer(JsonSchemaTransformer):
2222
Gemini supports [a subset of OpenAPI v3.0.3](https://ai.google.dev/gemini-api/docs/function-calling#function_declarations).
2323
"""
2424

25-
def __init__(self, schema: JsonSchema, *, strict: bool | None = None):
26-
# prefer_inlined_defs defaults to False (native $ref/$defs support)
27-
# simplify_nullable_unions defaults to False (Google now supports type: 'null' natively per Nov 2025 announcement)
28-
super().__init__(schema, strict=strict)
29-
3025
def transform(self, schema: JsonSchema) -> JsonSchema:
3126
# Remove properties not supported by Gemini
3227
schema.pop('$schema', None)

0 commit comments

Comments
 (0)