Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tofarr committed Dec 30, 2024
1 parent 0b8fe64 commit 42bd615
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions openhands/server/config/openhands_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class OpenhandsConfig(OpenhandsConfigInterface):
settings_store_class: str = (
'openhands.storage.settings.file_settings_store.FileSettingsStore'
)
conversation_store_class: str = (
'openhands.storage.conversation.file_conversation_store.FileConversationStore'
)

def verify_config(self):
if self.config_cls:
Expand Down
2 changes: 1 addition & 1 deletion openhands/server/data_models/conversation_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
class ConversationMetadata:
conversation_id: str
github_user_id: str
selected_repository: str | None
selected_repository: str | None
3 changes: 1 addition & 2 deletions openhands/server/routes/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@

SettingsStoreImpl = get_impl(SettingsStore, openhands_config.settings_store_class) # type: ignore
ConversationStoreImpl = get_impl(
ConversationStore,
'openhands.storage.file_conversation_store.FileConversationStore',
ConversationStore, openhands_config.conversation_store_class
) # type: ignore


Expand Down
6 changes: 4 additions & 2 deletions openhands/storage/conversation/conversation_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@ async def exists(self, conversation_id: str) -> bool:

@classmethod
@abstractmethod
async def get_instance(cls, config: AppConfig, token: str | None) -> ConversationStore:
"""Get a store for the user represented by the token given"""
async def get_instance(
cls, config: AppConfig, token: str | None
) -> ConversationStore:
"""Get a store for the user represented by the token given"""
1 change: 0 additions & 1 deletion openhands/storage/conversation/file_conversation_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,3 @@ async def exists(self, conversation_id: str) -> bool:
async def get_instance(cls, config: AppConfig, token: str | None):
file_store = get_file_store(config.file_store, config.file_store_path)
return FileConversationStore(file_store)

0 comments on commit 42bd615

Please sign in to comment.