Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mypy errors in storage directory #6809

Merged
merged 9 commits into from
Feb 19, 2025
Merged

Fix mypy errors in storage directory #6809

merged 9 commits into from
Feb 19, 2025

Conversation

neubig
Copy link
Contributor

@neubig neubig commented Feb 19, 2025

This PR fixes all mypy errors in the openhands/storage directory by:

  • Adding return type annotations to functions that were missing them
  • Fixing return type issues in google_cloud.py and s3.py by ensuring string returns

Changes are limited to the storage directory only.

Part of #6397


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:5d8d946-nikolaik   --name openhands-app-5d8d946   docker.all-hands.dev/all-hands-ai/openhands:5d8d946

openhands-agent and others added 8 commits January 21, 2025 19:12
- Update mypy configuration with stricter type checking rules
- Add more type stubs to pre-commit configuration
- Run mypy both through pre-commit and directly in CI
- Install project in editable mode for better type checking
- Set correct PYTHONPATH in CI environment
@neubig neubig marked this pull request as ready for review February 19, 2025 01:56
@neubig neubig enabled auto-merge (squash) February 19, 2025 02:32
@neubig neubig merged commit cb72a06 into main Feb 19, 2025
13 checks passed
@neubig neubig deleted the fix/storage-mypy-errors branch February 19, 2025 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants