Skip to content

when soft-error-limit is -1,it doesn't work #19228

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

Closed
kkscilife opened this issue Jun 4, 2025 · 2 comments
Closed

when soft-error-limit is -1,it doesn't work #19228

kkscilife opened this issue Jun 4, 2025 · 2 comments
Labels
bug mypy got something wrong

Comments

@kkscilife
Copy link

-   repo: https://github.com/pre-commit/mirrors-mypy
    rev: v1.16.0
    hooks:
      -  id: mypy
         args: ["--soft-error-limit=-1"]

while the result is:
xxx
Found 1 error in 1 file (errors prevented further checking)

It stoped checking after only one error.

@kkscilife kkscilife added the bug mypy got something wrong label Jun 4, 2025
@hauntsaninja
Copy link
Collaborator

"errors prevented further checking" <-- this means you hit something bad enough that mypy was unable to perform further checks. mypy typically tries to avoid these blocking errors.

But for example, there is no way for mypy to recover from a syntax error and check the rest of the file

@kkscilife
Copy link
Author

"errors prevented further checking" <-- this means you hit something bad enough that mypy was unable to perform further checks. mypy typically tries to avoid these blocking errors.

But for example, there is no way for mypy to recover from a syntax error and check the rest of the file

Thanks your reply. I resolved the problem by add args '--explicit-package-bases'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

2 participants