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

Is there a way to totally ignore all of the MyPy errors in specific project packages? #6155

Closed
salimfadhley opened this issue Jan 7, 2019 · 1 comment
Labels

Comments

@salimfadhley
Copy link

salimfadhley commented Jan 7, 2019

Is there a way to ignore all of the errors in certain packages within my project?

Some of the code in my project is compiled Protocol Buffers code which doesn't pass a MyPy check. It all lives within a directory /myproj/generated/proto.

Here's what I have in my mypy config file:

[mypy-myproject.generated]
ignore_missing_imports = True
ignore_errors = True

What can I add to this to make it ignore all error messages generated from an analysis of anything that's inside of myproject.generated?

I also asked this question on Stack Overflow.

@ilevkivskyi
Copy link
Member

ilevkivskyi commented Jan 7, 2019

You should use a glob instead:

[mypy-myproject.generated.*]
ignore_errors = True

(assuming you have __init__.py in myproject, in myproject/generated, etc).

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

No branches or pull requests

2 participants