Skip to content

Commit a899f80

Browse files
Fix mypy errors in storage directory (#7692)
Co-authored-by: openhands <[email protected]>
1 parent 292217b commit a899f80

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

openhands/storage/conversation/conversation_validator.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
class ConversationValidator:
77
"""Storage for conversation metadata. May or may not support multiple users depending on the environment."""
88

9-
async def validate(self, conversation_id: str, cookies_str: str):
9+
async def validate(self, conversation_id: str, cookies_str: str) -> tuple[None, None]:
1010
return None, None
1111

1212

13-
def create_conversation_validator():
13+
def create_conversation_validator() -> ConversationValidator:
1414
conversation_validator_cls = os.environ.get(
1515
'OPENHANDS_CONVERSATION_VALIDATOR_CLS',
1616
'openhands.storage.conversation.conversation_validator.ConversationValidator',

openhands/storage/google_cloud.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import os
22

33
from google.api_core.exceptions import NotFound
4-
from google.cloud import storage # type: ignore
5-
from google.cloud.storage.blob import Blob # type: ignore
6-
from google.cloud.storage.bucket import Bucket # type: ignore
7-
from google.cloud.storage.client import Client # type: ignore
4+
from google.cloud import storage
5+
from google.cloud.storage.blob import Blob
6+
from google.cloud.storage.bucket import Bucket
7+
from google.cloud.storage.client import Client
88

99
from openhands.storage.files import FileStore
1010

openhands/storage/s3.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def read(self, path: str) -> str:
6060
response: GetObjectOutputDict = self.client.get_object(
6161
Bucket=self.bucket, Key=path
6262
)
63-
with response['Body'] as stream: # type: ignore
63+
with response['Body'] as stream:
6464
return str(stream.read().decode('utf-8'))
6565
except botocore.exceptions.ClientError as e:
6666
# Catch all S3-related errors

0 commit comments

Comments
 (0)