Skip to content

Commit a8ceb26

Browse files
committed
Satisfy mypy
1 parent 860a098 commit a8ceb26

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llm-service/app/services/chat_history/chat_history_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class RagStudioChatMessage(BaseModel):
6464

6565

6666
class ChatHistoryManager(metaclass=ABCMeta):
67-
def __init__(self):
67+
def __init__(self) -> None:
6868
pass
6969

7070
@abstractmethod

llm-service/app/services/chat_history/s3_chat_history_manager.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import functools
3939
import json
4040
import logging
41-
from typing import List
41+
from typing import List, cast
4242

4343
import boto3
4444
from boto3 import Session
@@ -57,7 +57,7 @@
5757
class S3ChatHistoryManager(ChatHistoryManager):
5858
"""Chat history manager that uses S3 for storage."""
5959

60-
def __init__(self):
60+
def __init__(self) -> None:
6161
super().__init__()
6262
self.bucket_name = settings.document_bucket
6363
self.bucket_prefix = settings.document_bucket_prefix
@@ -66,7 +66,7 @@ def __init__(self):
6666
def s3_client(self) -> S3Client:
6767
"""Lazy initialization of S3 client."""
6868
session: Session = boto3.session.Session()
69-
return session.client("s3")
69+
return cast(S3Client, session.client("s3"))
7070

7171
def _get_s3_key(self, session_id: int) -> str:
7272
"""Build the S3 key for a session's chat history."""

0 commit comments

Comments
 (0)