Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suppress Mypy notes

Tags:

python

mypy

I'm getting a ton of "notes" from Mypy output of the form:

note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]

Even explicitly setting check_untyped_defs = false in my pyproject.toml doesn't help.

How can I suppress these notes?

like image 551
Garrett Avatar asked Feb 13 '26 14:02

Garrett


1 Answers

You can solve this with --disable-error-code "annotation-unchecked"

Or in a config file:

[mypy]
disable_error_code = annotation-unchecked

Except for getting rid of tons of terminal lines, it might needed if you are using 'junit' style reports and your CI/Jenkins will mark this build as failure, even though the mypy command itself returns with 0 (Success: no issues found)

like image 182
smido Avatar answered Feb 16 '26 03:02

smido



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!