mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
As requested by https://github.com/python/typeshed/issues/1526. This addition takes mypy configuration from each distribution metadata file and constructs a single mypy.ini to run with. It assumes there is no mypy.ini but in case we ever need one, it would be simple to add these on top of an existing configuration file. Might be relevant for #2852 As the issue did not really specify how the configuration would look, I added the following: - You may add a mypy-tests section to the metadata file. It looks like this: [mypy-tests] [mypy-tests.yaml] module_name = "yaml" [mypy-tests.yaml.values] disallow_incomplete_defs = true disallow_untyped_defs = true - module_name can be of the form "a.*" like in mypy.ini. - You can add several module sections for complex distributions with several modules. - I added the '--warn-incomplete-stub' option since it is made specifically for typeshed runs. See docs.