stop deprecated Extra.allow access in Node - #88
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe change updates the Pydantic import in ChangesPydantic configuration update
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This localized change removes a deprecation warning without changing Node validation or caller-visible behavior. No actionable merge-blocking risk remains after normal checks and review. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Extra.allow access in Node (fixes #87)Extra.allow access in Node
Fixes #87
Summary
Replaces the deprecated
Extra.allowmember access insideNode's nestedclass Metainsrc/constants/kg.pywith the literal string"allow", and dropsthe now-unused
Extraimport.Every import of
src/constants/kg.pyunder pydantic v2 currently emits aPydanticDeprecatedSince20warning. This removes it.Changes
src/constants/kg.py:extra = Extra.allow→extra = "allow"; import linedrops
Extra(BaseModel, ConfigDict, Field).Notes
class Metais inert as far as pydantic is concerned (onlyConfig/model_configare honored), so this is a strict no-behavior-change fix.If the docstring intent — actually allowing extra properties — is wanted, that is
a separate change (
model_config = ConfigDict(extra="allow")onNode) thatshould land deliberately, as it changes runtime behavior.
Testing
(before: 1
DeprecationWarning), model construction behavior unchanged.