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 events directory #6810

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Conversation

neubig
Copy link
Contributor

@neubig neubig commented Feb 19, 2025

This PR fixes all mypy errors in the openhands/events directory. The changes include:

  • Added proper type annotations to functions and methods
  • Fixed issues with Any vs any
  • Added proper type checking for getattr() calls
  • Fixed string concatenation with dict
  • Added proper null checks for optional values
  • Fixed lambda type inference issues
  • Added proper type assertions for returned values

All changes are confined to the openhands/events directory.

Part of #6809


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

@neubig neubig marked this pull request as ready for review February 19, 2025 02:35
@neubig neubig self-assigned this Feb 21, 2025
@neubig neubig removed their assignment Feb 21, 2025
@neubig neubig self-assigned this Feb 22, 2025
@neubig neubig enabled auto-merge (squash) February 22, 2025 02:03
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