Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
patcher9 committed Mar 8, 2024
1 parent e7a6f60 commit 136a8b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/dokumetry/anthropic.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def stream_generator():
send_data(data, doku_url, api_key)

return stream_generator()
# pylint disable=no-else-return
else:
start_time = time.time()
response = original_messages_create(*args, **kwargs)
Expand Down Expand Up @@ -134,6 +135,5 @@ def stream_generator():
send_data(data, doku_url, api_key)

return response


llm.messages.create = patched_messages_create

llm.messages.create = patched_messages_create
8 changes: 4 additions & 4 deletions src/dokumetry/async_anthropic.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import time
from .__helpers import send_data

# pylint: disable=too-many-arguments
# pylint: disable=too-many-arguments,too-many-statements
def init(llm, doku_url, api_key, environment, application_name, skip_resp):
"""
Initialize Anthropic integration with Doku.
Expand Down Expand Up @@ -35,6 +35,7 @@ async def patched_messages_create(*args, **kwargs):
"""
streaming = kwargs.get('stream', False)
start_time = time.time()
#pylint: disable=no-else-return
if streaming:
async def stream_generator():
accumulated_content = ""
Expand Down Expand Up @@ -134,6 +135,5 @@ async def stream_generator():
send_data(data, doku_url, api_key)

return response


llm.messages.create = patched_messages_create

llm.messages.create = patched_messages_create

0 comments on commit 136a8b4

Please sign in to comment.