forked from phoenix/litellm-mirror
build(test_streaming.py): fix linting issues
This commit is contained in:
parent
343a06fd84
commit
402b2e5733
3 changed files with 7 additions and 4 deletions
|
@ -13,5 +13,4 @@ repos:
|
|||
entry: python3 -m mypy --ignore-missing-imports
|
||||
language: system
|
||||
types: [python]
|
||||
files: ^litellm/
|
||||
exclude: ^litellm/tests/
|
||||
files: ^litellm/
|
|
@ -48,6 +48,9 @@ class MaxParallelRequestsHandler(CustomLogger):
|
|||
if user_api_key is None:
|
||||
return
|
||||
|
||||
if self.user_api_key_cache is None:
|
||||
return
|
||||
|
||||
request_count_api_key = f"{user_api_key}_request_count"
|
||||
# check if it has collected an entire stream response
|
||||
self.print_verbose(f"'complete_streaming_response' is in kwargs: {'complete_streaming_response' in kwargs}")
|
||||
|
@ -67,6 +70,9 @@ class MaxParallelRequestsHandler(CustomLogger):
|
|||
if api_key is None:
|
||||
return
|
||||
|
||||
if self.user_api_key_cache is None:
|
||||
return
|
||||
|
||||
## decrement call count if call failed
|
||||
if (hasattr(original_exception, "status_code")
|
||||
and original_exception.status_code == 429
|
||||
|
|
|
@ -1003,8 +1003,6 @@ def test_together_ai_completion_call_mistral():
|
|||
print(f"error occurred: {traceback.format_exc()}")
|
||||
pass
|
||||
|
||||
test_together_ai_completion_call_starcoder()
|
||||
|
||||
def test_together_ai_completion_call_starcoder_bad_key():
|
||||
try:
|
||||
api_key = "bad-key"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue