Skip to content

Conversation

@neubig
Copy link
Contributor

@neubig neubig commented Apr 6, 2025

This PR adds more extensive typing to the openhands/integrations directory to comply with strict mypy checks. The changes include:

  • Added return type annotations to methods in provider.py
  • Fixed Any return types in github_service.py
  • Improved type annotations for MappingProxyType
  • Removed unused imports in gitlab_service.py

All pre-commit checks pass for the modified files.


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:1dd04a5-nikolaik   --name openhands-app-1dd04a5   docker.all-hands.dev/all-hands-ai/openhands:1dd04a5

openhands-agent and others added 24 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 changed the base branch from feature/strict-mypy-checks to main April 6, 2025 20:06
Copy link
Collaborator

@enyst enyst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@neubig neubig merged commit c8904e4 into main Apr 8, 2025
14 checks passed
@neubig neubig deleted the fix-integrations-typing branch April 8, 2025 14:54
shabbir-shakudo pushed a commit to devsentient/OpenHands that referenced this pull request Jul 15, 2025
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.

4 participants