-
- Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
bugmypy got something wrongmypy got something wrongtopic-configurationConfiguration files and flagsConfiguration files and flags
Description
Bug Report
It's unclear from the docs and runtime what the expected behavior is if you define multiple [[tool.mypy.overrides]] with overlapping modules.
To Reproduce
[[tool.mypy.overrides]] module = [ "openstack._log", "openstack.cloud._baremetal", "openstack.common", "openstack.common.*", "openstack.config", "openstack.config.*", "openstack.connection", "openstack.exceptions", "openstack.fields", "openstack.format", "openstack.proxy", "openstack.utils", "openstack.version", "openstack.warnings", ] warn_return_any = true disallow_untyped_decorators = true disallow_any_generics = true disallow_subclassing_any = true disallow_untyped_calls = true disallow_untyped_defs = true no_implicit_reexport = true [[tool.mypy.overrides]] module = [ "openstack.cloud._baremetal", ] # unset 'warn_return_any' since we need to type the proxy classes first warn_return_any = falseExpected Behavior
I would expect the configuration to layer, with later (in the file) configuration overriding earlier configuration.
Actual Behavior
In my instance, later configuration related to unit tests was ignored. I have no investigated what's happening here though.
Your Environment
- Mypy version used: mypy 1.16.1
- Mypy command-line flags: none
- Mypy configuration options from
mypy.ini(and other config files): per above - Python version used: python 3.13.3
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongtopic-configurationConfiguration files and flagsConfiguration files and flags