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

[Bug]: pre-commit mypy does not catch errors #6396

Open
1 task done
neubig opened this issue Jan 21, 2025 · 1 comment · May be fixed by #6397
Open
1 task done

[Bug]: pre-commit mypy does not catch errors #6396

neubig opened this issue Jan 21, 2025 · 1 comment · May be fixed by #6397
Labels
bug Something isn't working

Comments

@neubig
Copy link
Contributor

neubig commented Jan 21, 2025

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Describe the bug and reproduction steps

Our pre-commit config includes mypy:

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
hooks:
- id: mypy
additional_dependencies:
[types-requests, types-setuptools, types-pyyaml, types-toml]
entry: mypy --config-file dev_config/python/mypy.ini openhands/
always_run: true
pass_filenames: false

And it seems to be passing.

However, when running the same command with mypy directly results in many errors.

Found 94 errors in 27 files (checked 218 source files)

openhands-mypy.txt

We should examine why pre-commit is not catching errors, because our ci pipeline also relies on pre-commit.

OpenHands Installation

Docker command in README

OpenHands Version

No response

Operating System

None

Logs, Errors, Screenshots, and Additional Context

No response

@neubig neubig added the bug Something isn't working label Jan 21, 2025
@neubig neubig linked a pull request Jan 21, 2025 that will close this issue
@enyst
Copy link
Collaborator

enyst commented Jan 21, 2025

It seems that the pre-commit yaml has version v1.9.0, while our pyproject.toml has 1.14.1. Could that be the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants