Skip to content

Add model attribute declaration to BaseProvider#5

Closed
prudhvirapeti wants to merge 1 commit into
PracticalMind:mainfrom
prudhvirapeti:fix/base-provider-model-attr
Closed

Add model attribute declaration to BaseProvider#5
prudhvirapeti wants to merge 1 commit into
PracticalMind:mainfrom
prudhvirapeti:fix/base-provider-model-attr

Conversation

@prudhvirapeti
Copy link
Copy Markdown

Summary

Fixes #3

  • Added model: str class-level annotation to BaseProvider in skate/providers/base.py
  • All provider subclasses (OpenAIProvider, AnthropicProvider, etc.) already assign self.model in __init__, but the abstract base class never declared it
  • Without this declaration, type checkers like mypy cannot verify the attribute exists on the base class

Changes

One line added to skate/providers/base.py:

class BaseProvider(ABC):
    model: str  # ← added
    ...

Test plan

  • pip install -e ".[dev]"
  • mypy skate/providers/base.py — no errors
  • pytest tests/ — all tests pass

🤖 Generated with Claude Code

Fixes PracticalMind#3 — all provider subclasses assign self.model but the abstract
base class never declared it, making type checkers unable to verify
the attribute exists.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@baranylcn
Copy link
Copy Markdown
Contributor

Hi @prudhvirapeti, thank you for the contribution! Unfortunately #4 was opened earlier with the same change, so we're going with that one. Your PR description was excellent, please keep contributing!

@baranylcn baranylcn closed this May 13, 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.

BaseProvider missing model attribute declaration

2 participants