🧹 Refactor add_trusted_user to use TrustedUserData dataclass - #30
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Rebase from main and add mypy cache into gitignore |
I have rebased from main, resolved all conflicts, re-applied the |
Groups the eight parameters of add_trusted_user into a TrustedUserData Pydantic BaseModel and updates the trust handler and tests to build it. Matches the CaptchaData DTO already used by add_pending_captcha. Drops the committed .mypy_cache artifacts and ignores .mypy_cache, .ruff_cache, and .hypothesis so tool caches stay out of the tree.
a692136 to
ed07cfd
Compare
🎯 What: Replaced the 8 keyword arguments in
add_trusted_userwith a singleTrustedUserDatadataclass object.💡 Why: Having too many arguments affects code readability, makes changes error-prone, and violates clean code principles. Moving to a dataclass preserves type hints while encapsulating data effectively.
✅ Verification: Verified by running
pytest tests/(all passed),ruff check, andmypy src/.✨ Result: Improved maintainability and shorter method signature.
PR created automatically by Jules for task 1746589283035311618 started by @rezhajulio