diff --git a/.vscode/settings.json b/.vscode/settings.json index 70599b8520..5f1e58f516 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,4 +3,20 @@ "files.eol": "\n", "files.trimTrailingWhitespace": true, "files.insertFinalNewline": true, + + "python.defaultInterpreterPath": "./.venv/bin/python", + "python.terminal.activateEnvironment": true, + "python.analysis.autoImportCompletions": true, + "python.analysis.autoSearchPaths": true, + "python.analysis.extraPaths": [ + "./.venv/lib/python3.12/site-packages" + ], + "python.analysis.packageIndexDepths": [ + { + "name": "openhands", + "depth": 10, + "includeAllSymbols": true + } + ], + "python.analysis.stubPath": "./.venv/lib/python3.12/site-packages", } diff --git a/openhands/app_server/config.py b/openhands/app_server/config.py index d5dd726081..2dd50d7fa7 100644 --- a/openhands/app_server/config.py +++ b/openhands/app_server/config.py @@ -104,7 +104,7 @@ class AppServerConfig(OpenHandsModel): ) # Services - lifespan: AppLifespanService = Field(default_factory=_get_default_lifespan) + lifespan: AppLifespanService | None = Field(default_factory=_get_default_lifespan) def config_from_env() -> AppServerConfig: @@ -291,7 +291,7 @@ def get_db_session( return get_global_config().db_session.context(state, request) -def get_app_lifespan_service() -> AppLifespanService: +def get_app_lifespan_service() -> AppLifespanService | None: config = get_global_config() return config.lifespan diff --git a/pyproject.toml b/pyproject.toml index 0f73bb0e7b..b5f6a40230 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -115,7 +115,6 @@ pybase62 = "^1.0.0" # V1 dependencies openhands-agent-server = { git = "https://github.com/All-Hands-AI/agent-sdk.git", subdirectory = "openhands-agent-server", rev = "8d8134ca5a87cc3e90e3ff968327a7f4c961e22e" } openhands-sdk = { git = "https://github.com/All-Hands-AI/agent-sdk.git", subdirectory = "openhands-sdk", rev = "8d8134ca5a87cc3e90e3ff968327a7f4c961e22e" } -# This refuses to install openhands-tools = { git = "https://github.com/All-Hands-AI/agent-sdk.git", subdirectory = "openhands-tools", rev = "8d8134ca5a87cc3e90e3ff968327a7f4c961e22e" } python-jose = { version = ">=3.3", extras = [ "cryptography" ] } sqlalchemy = { extras = [ "asyncio" ], version = "^2.0.40" }