mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
test: narrow Optional results before len() to satisfy basedpyright budget
The lint gate (basedpyright delta-vs-base budget) flagged one new reportArgumentType: len(result.results) where results is List[RerankResponseResult] | None. Assert results is not None first to narrow the type before len()/indexing.
This commit is contained in:
parent
8f90e9ea44
commit
ce839f1b2d
1 changed files with 1 additions and 0 deletions
|
|
@ -123,6 +123,7 @@ class TestHostedVLLMRerankTransform:
|
|||
}
|
||||
result = self.config._transform_response(response_dict)
|
||||
assert result.id == "abc123"
|
||||
assert result.results is not None
|
||||
assert len(result.results) == 2
|
||||
assert result.results[0]["index"] == 0
|
||||
assert result.results[0]["relevance_score"] == 0.9
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue