fix(agents): preserve string filter names - #163
floze-the-genius wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthrough
ChangesActorsList selection
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change preserves supported string, dictionary, callable, and None filter behavior, with regression coverage and all reported checks passing; no actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
Summary
ActorsList.selectrebindsfilter_functo its predicate closureNonefilter formsHumanModule.actorsregression testRoot cause
The string branch defined a nested function with the same name as its
filter_funcargument. Python resolves that closure variable when the predicate runs, after the local name has been rebound to the nested function itself.getattrtherefore received a function instead of the original attribute-name string.Fixes #152.
Testing
Before the fix, the new targeted regression run produced exactly two failures and two passes: the string form and
HumanModule.actorsraisedTypeError, while dictionary and callable filters passed.After the fix:
tests/api/test_sequence.pyandtests/api/test_human.py: 22 passedruff check abses/: passedmypy abses/: passed for 54 source files; the final widened signature was also checked directlygit diff --check: passedSummary by CodeRabbit
New Features
Bug Fixes
Tests