mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-08-27 14:17:10 -04:00
test: add missing type hints to FakeProvider in test_utils (#631)
This commit is contained in:
parent
45b07bf754
commit
0d458e5d45
1 changed files with 2 additions and 2 deletions
|
|
@ -6,13 +6,13 @@ from headroom import utils
|
|||
|
||||
|
||||
class FakeProvider:
|
||||
def __init__(self, result):
|
||||
def __init__(self, result: str | None) -> None:
|
||||
self.result = result
|
||||
self.calls: list[tuple[int, int, str, int]] = []
|
||||
|
||||
def estimate_cost(
|
||||
self, input_tokens: int, output_tokens: int, model: str, cached_tokens: int = 0
|
||||
):
|
||||
) -> str | None:
|
||||
self.calls.append((input_tokens, output_tokens, model, cached_tokens))
|
||||
return self.result
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue