-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Closed
Copy link
Labels
Feature requestNew feature requestNew feature request
Description
Question
pydantic_ai/__init__.py exposes a seemingly random subset of types by setting the modules __all__ attribute. Since the list is not exhaustive of all elements, this messes with my type checker and IDE auto-imports. What is the rationale behind the selected items? Is the list outdated and could it be changed or expanded?
Usually, we'd use this for more convenient, less deep import chains, e.g. from pydantic_ai import ToolDefinition, but other dev tooling doesn't seem to like this exposing of a subset of types.
Example
ToolDefinition is exposed here, so a type checker can find it:
| 'ToolDefinition', |
ModelRequest is not exposed, so no auto-import available and some type checkers can complain:
Additional Context
No response
Metadata
Metadata
Assignees
Labels
Feature requestNew feature requestNew feature request