-
Notifications
You must be signed in to change notification settings - Fork 126
fix(toolset): access model fields via class #540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
WalkthroughThe Changes
Sequence Diagram(s)sequenceDiagram
participant SourceToolset as Source Toolset Instance
participant TargetToolset as Target Toolset Instance
SourceToolset->>TargetToolset: override_with(SourceToolset)
loop For each field in SourceToolset
TargetToolset->>TargetToolset: Check if field in TargetToolset.__class__.model_fields
alt Field exists
TargetToolset->>TargetToolset: Override field value
end
end
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
PR Summary
This small PR updates the usage of field metadata access within the
Toolset
model to align with the Pydantic V2 API and resolvePydanticDeprecatedSince211
warnings. Specifically:self.model_fields
with class-levelself.__class__.model_fields
inholmes/core/tools.py
, as required by the Pydantic V2 convention for accessing model fields.These changes ensure compatibility with Pydantic V2+ and address deprecation warnings related to
model_fields
, as seen in the CI logs: