- Set ignore_missing_imports = True at global [mypy] level - Add explicit sections for odoo, odoo.*, and odoo.addons.* - Fixes pre-commit hook failures when mypy checks Odoo addon files - Resolves 'Cannot find implementation or library stub for module named odoo' errors This is a known issue with Odoo stubs not being fully compatible with mypy.
17 lines
419 B
INI
17 lines
419 B
INI
[mypy]
|
|
# Exclude migration scripts (post-migrate.py etc.) from mypy checks to avoid
|
|
# duplicate module name errors when multiple addons include scripts with the
|
|
# same filename.
|
|
exclude = .*/migrations/.*
|
|
|
|
# Ignore missing imports from Odoo modules
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-odoo]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-odoo.*]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-odoo.addons.*]
|
|
ignore_missing_imports = True
|