Fixes for VSCode code completion (#11449)

This commit is contained in:
Tim O'Farrell 2025-10-21 15:39:50 -06:00 committed by GitHub
parent cd967ef4bc
commit dbddc1868e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 3 deletions

16
.vscode/settings.json vendored
View File

@ -3,4 +3,20 @@
"files.eol": "\n", "files.eol": "\n",
"files.trimTrailingWhitespace": true, "files.trimTrailingWhitespace": true,
"files.insertFinalNewline": 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",
} }

View File

@ -104,7 +104,7 @@ class AppServerConfig(OpenHandsModel):
) )
# Services # Services
lifespan: AppLifespanService = Field(default_factory=_get_default_lifespan) lifespan: AppLifespanService | None = Field(default_factory=_get_default_lifespan)
def config_from_env() -> AppServerConfig: def config_from_env() -> AppServerConfig:
@ -291,7 +291,7 @@ def get_db_session(
return get_global_config().db_session.context(state, request) 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() config = get_global_config()
return config.lifespan return config.lifespan

View File

@ -115,7 +115,6 @@ pybase62 = "^1.0.0"
# V1 dependencies # V1 dependencies
openhands-agent-server = { git = "https://github.com/All-Hands-AI/agent-sdk.git", subdirectory = "openhands-agent-server", rev = "8d8134ca5a87cc3e90e3ff968327a7f4c961e22e" } 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" } 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" } openhands-tools = { git = "https://github.com/All-Hands-AI/agent-sdk.git", subdirectory = "openhands-tools", rev = "8d8134ca5a87cc3e90e3ff968327a7f4c961e22e" }
python-jose = { version = ">=3.3", extras = [ "cryptography" ] } python-jose = { version = ">=3.3", extras = [ "cryptography" ] }
sqlalchemy = { extras = [ "asyncio" ], version = "^2.0.40" } sqlalchemy = { extras = [ "asyncio" ], version = "^2.0.40" }