Skip to content

Commit bc71b97

Browse files
committed
chore(fasta2a): updated with_config style
Update the style of pydantic.with_config decorators to address deprecation warnings.
1 parent cc8f035 commit bc71b97

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

fasta2a/fasta2a/schema.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from typing_extensions import NotRequired, TypeAlias, TypedDict
1111

1212

13-
@pydantic.with_config(config={'alias_generator': to_camel})
13+
@pydantic.with_config({'alias_generator': to_camel})
1414
class AgentCard(TypedDict):
1515
"""The card that describes an agent."""
1616

@@ -66,7 +66,7 @@ class Provider(TypedDict):
6666
url: str
6767

6868

69-
@pydantic.with_config(config={'alias_generator': to_camel})
69+
@pydantic.with_config({'alias_generator': to_camel})
7070
class Capabilities(TypedDict):
7171
"""The capabilities of the agent."""
7272

@@ -80,7 +80,7 @@ class Capabilities(TypedDict):
8080
"""Whether the agent exposes status change history for tasks."""
8181

8282

83-
@pydantic.with_config(config={'alias_generator': to_camel})
83+
@pydantic.with_config({'alias_generator': to_camel})
8484
class Authentication(TypedDict):
8585
"""The authentication schemes supported by the agent."""
8686

@@ -91,7 +91,7 @@ class Authentication(TypedDict):
9191
"""The credentials a client should use for private cards."""
9292

9393

94-
@pydantic.with_config(config={'alias_generator': to_camel})
94+
@pydantic.with_config({'alias_generator': to_camel})
9595
class Skill(TypedDict):
9696
"""Skills are a unit of capability that an agent can perform."""
9797

@@ -126,7 +126,7 @@ class Skill(TypedDict):
126126
"""Supported mime types for output data."""
127127

128128

129-
@pydantic.with_config(config={'alias_generator': to_camel})
129+
@pydantic.with_config({'alias_generator': to_camel})
130130
class Artifact(TypedDict):
131131
"""Agents generate Artifacts as an end result of a Task.
132132
@@ -159,7 +159,7 @@ class Artifact(TypedDict):
159159
"""Whether this is the last chunk of the artifact."""
160160

161161

162-
@pydantic.with_config(config={'alias_generator': to_camel})
162+
@pydantic.with_config({'alias_generator': to_camel})
163163
class PushNotificationConfig(TypedDict):
164164
"""Configuration for push notifications.
165165
@@ -193,7 +193,7 @@ class PushNotificationConfig(TypedDict):
193193
"""Authentication details for push notifications."""
194194

195195

196-
@pydantic.with_config(config={'alias_generator': to_camel})
196+
@pydantic.with_config({'alias_generator': to_camel})
197197
class TaskPushNotificationConfig(TypedDict):
198198
"""Configuration for task push notifications."""
199199

@@ -242,7 +242,7 @@ class TextPart(_BasePart):
242242
"""The text of the part."""
243243

244244

245-
@pydantic.with_config(config={'alias_generator': to_camel})
245+
@pydantic.with_config({'alias_generator': to_camel})
246246
class FilePart(_BasePart):
247247
"""A part that contains a file."""
248248

@@ -253,7 +253,7 @@ class FilePart(_BasePart):
253253
"""The file of the part."""
254254

255255

256-
@pydantic.with_config(config={'alias_generator': to_camel})
256+
@pydantic.with_config({'alias_generator': to_camel})
257257
class _BaseFile(_BasePart):
258258
"""A base class for all file types."""
259259

@@ -264,15 +264,15 @@ class _BaseFile(_BasePart):
264264
"""The mime type of the file."""
265265

266266

267-
@pydantic.with_config(config={'alias_generator': to_camel})
267+
@pydantic.with_config({'alias_generator': to_camel})
268268
class _BinaryFile(_BaseFile):
269269
"""A binary file."""
270270

271271
data: str
272272
"""The base64 encoded bytes of the file."""
273273

274274

275-
@pydantic.with_config(config={'alias_generator': to_camel})
275+
@pydantic.with_config({'alias_generator': to_camel})
276276
class _URLFile(_BaseFile):
277277
"""A file that is hosted on a remote URL."""
278278

@@ -284,7 +284,7 @@ class _URLFile(_BaseFile):
284284
"""A file is a binary file or a URL file."""
285285

286286

287-
@pydantic.with_config(config={'alias_generator': to_camel})
287+
@pydantic.with_config({'alias_generator': to_camel})
288288
class DataPart(_BasePart):
289289
"""A part that contains data."""
290290

@@ -305,7 +305,7 @@ class DataPart(_BasePart):
305305
"""The possible states of a task."""
306306

307307

308-
@pydantic.with_config(config={'alias_generator': to_camel})
308+
@pydantic.with_config({'alias_generator': to_camel})
309309
class TaskStatus(TypedDict):
310310
"""Status and accompanying message for a task."""
311311

@@ -319,7 +319,7 @@ class TaskStatus(TypedDict):
319319
"""ISO datetime value of when the status was updated."""
320320

321321

322-
@pydantic.with_config(config={'alias_generator': to_camel})
322+
@pydantic.with_config({'alias_generator': to_camel})
323323
class Task(TypedDict):
324324
"""A Task is a stateful entity that allows Clients and Remote Agents to achieve a specific outcome.
325325
@@ -346,7 +346,7 @@ class Task(TypedDict):
346346
"""Extension metadata."""
347347

348348

349-
@pydantic.with_config(config={'alias_generator': to_camel})
349+
@pydantic.with_config({'alias_generator': to_camel})
350350
class TaskStatusUpdateEvent(TypedDict):
351351
"""Sent by server during sendSubscribe or subscribe requests."""
352352

@@ -363,7 +363,7 @@ class TaskStatusUpdateEvent(TypedDict):
363363
"""Extension metadata."""
364364

365365

366-
@pydantic.with_config(config={'alias_generator': to_camel})
366+
@pydantic.with_config({'alias_generator': to_camel})
367367
class TaskArtifactUpdateEvent(TypedDict):
368368
"""Sent by server during sendSubscribe or subscribe requests."""
369369

@@ -377,23 +377,23 @@ class TaskArtifactUpdateEvent(TypedDict):
377377
"""Extension metadata."""
378378

379379

380-
@pydantic.with_config(config={'alias_generator': to_camel})
380+
@pydantic.with_config({'alias_generator': to_camel})
381381
class TaskIdParams(TypedDict):
382382
"""Parameters for a task id."""
383383

384384
id: str
385385
metadata: NotRequired[dict[str, Any]]
386386

387387

388-
@pydantic.with_config(config={'alias_generator': to_camel})
388+
@pydantic.with_config({'alias_generator': to_camel})
389389
class TaskQueryParams(TaskIdParams):
390390
"""Query parameters for a task."""
391391

392392
history_length: NotRequired[int]
393393
"""Number of recent messages to be retrieved."""
394394

395395

396-
@pydantic.with_config(config={'alias_generator': to_camel})
396+
@pydantic.with_config({'alias_generator': to_camel})
397397
class TaskSendParams(TypedDict):
398398
"""Sent by the client to the agent to create, continue, or restart a task."""
399399

0 commit comments

Comments
 (0)