fix(oocana): convert CredentialInput to dataclass#462
fix(oocana): convert CredentialInput to dataclass#462leavesster wants to merge 1 commit intomainfrom
Conversation
The CredentialInput class was a plain class with a simple __init__. Converting to dataclass provides: - Automatic __repr__ and __eq__ methods - Consistent with other data classes in the codebase - frozen=True makes it immutable for safety - Added docstring and __all__ export
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. Comment |
There was a problem hiding this comment.
Pull request overview
Converts CredentialInput into an immutable (frozen) dataclass and makes it an explicit public export.
Changes:
- Replaced the manual
CredentialInputclass with a@dataclass(frozen=True)version. - Added module-level
__all__export forCredentialInput. - Added a class docstring describing purpose and attributes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| __all__ = ["CredentialInput"] | ||
|
|
||
|
|
||
| @dataclass(frozen=True) |
There was a problem hiding this comment.
All other dataclasses in this package are declared with kw_only=True (e.g., oocana/oocana/handle.py:7, oocana/oocana/data.py:41, oocana/oocana/schema.py:38). To keep CredentialInput consistent and avoid accidental positional-argument usage, consider adding kw_only=True here as well.
Summary
CredentialInputclass to a frozen dataclass__all__exportsProblem
CredentialInputwas a plain class without standard data structure features:__eq__,__hash__,__repr____all__Solution
Test Plan