All provider classes (OpenAIProvider, AnthropicProvider, etc.) store the model name as self.model, but the abstract base class never declares this attribute. Type checkers like mypy can't see it.
Current behavior
# base.py
class BaseProvider(ABC):
@abstractmethod
async def run(self, prompt: str, ...) -> ModelResult: ...
# no `model` attribute
# every provider does this, but base doesn't know about it
class OpenAIProvider(BaseProvider):
def __init__(self, model: str) -> None:
self.model = model # type checker can't verify this
Expected behavior
class BaseProvider(ABC):
model: str # declared here
@abstractmethod
async def run(self, prompt: str, ...) -> ModelResult: ...
Files to change
skate/providers/base.py - add model: str class-level annotation
That's it. One line.
How to verify
pip install -e ".[dev]"
mypy skate/providers/base.py
pytest tests/
Tests should still pass, mypy should be happy.
All provider classes (OpenAIProvider, AnthropicProvider, etc.) store the model name as self.model, but the abstract base class never declares this attribute. Type checkers like mypy can't see it.
Current behavior
Expected behavior
Files to change
skate/providers/base.py- addmodel: strclass-level annotationThat's it. One line.
How to verify
Tests should still pass, mypy should be happy.