Skip to content

Conversation

@leavesster
Copy link
Contributor

Summary

  • Convert CredentialInput class to a frozen dataclass
  • Add to __all__ exports
  • Add docstring

Problem

CredentialInput was a plain class without standard data structure features:

  • No automatic __eq__, __hash__, __repr__
  • Not exported in __all__
  • Inconsistent with other data classes in the codebase

Solution

from dataclasses import dataclass

__all__ = ["CredentialInput"]

@dataclass(frozen=True)
class CredentialInput:
    """Credential input configuration for authentication."""
    type: str
    id: str

Test Plan

  • All existing tests pass
  • CredentialInput now supports equality comparison and hashing

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
Copilot AI review requested due to automatic review settings January 31, 2026 09:28
@coderabbitai
Copy link

coderabbitai bot commented Jan 31, 2026

Warning

Rate limit exceeded

@leavesster has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 31 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Converts CredentialInput into an immutable (frozen) dataclass and makes it an explicit public export.

Changes:

  • Replaced the manual CredentialInput class with a @dataclass(frozen=True) version.
  • Added module-level __all__ export for CredentialInput.
  • 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)
Copy link

Copilot AI Jan 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@leavesster leavesster changed the title fix: convert CredentialInput to dataclass fix(oocana): convert CredentialInput to dataclass Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants