Title: Support package and module in config files · Issue #10728 · python/mypy · GitHub
Open Graph Title: Support package and module in config files · Issue #10728 · python/mypy
X Title: Support package and module in config files · Issue #10728 · python/mypy
Description: Feature Allow listing modules/packages to check, within the MyPy config files. Pitch Today, it is possible to use the files config item (in mypy.ini, pyproject.toml, etc.) to tell MyPy what files to check. You can also do this on the com...
Open Graph Description: Feature Allow listing modules/packages to check, within the MyPy config files. Pitch Today, it is possible to use the files config item (in mypy.ini, pyproject.toml, etc.) to tell MyPy what files t...
X Description: Feature Allow listing modules/packages to check, within the MyPy config files. Pitch Today, it is possible to use the files config item (in mypy.ini, pyproject.toml, etc.) to tell MyPy what files t...
Opengraph URL: https://github.com/python/mypy/issues/10728
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support package and module in config files","articleBody":"**Feature**\r\n\r\nAllow listing modules/packages to check, within the MyPy config files.\r\n\r\n**Pitch**\r\n\r\nToday, it is possible to use the `files` config item (in mypy.ini, pyproject.toml, etc.) to tell MyPy what files to check. You can also do this on the command-line, by simply listing the files.\r\n\r\nIf you want MyPy to check an entire module or package, you can do so on the command line (with `-m` or `-p`), but there is no way to do this in a config file. Since it is possible to set `files` in config files, I think it should also be possible to set `module` and `package`. (I am suggesting not-plural names \"module\" and \"package\" to match the command-line arguments).\r\n\r\nOne question you might ask is \"Why don't you just list the directory containing your modules/packages?\" In my case, doing so gives me an error like this:\r\n\r\n```\r\nsrc/namespace1/namespace2/package1/file.py: error: Source file found twice under different module names: `package2` and `namespace1.namespace2.package2`\r\n```\r\n\r\n… or an error like this:\r\n\r\n```\r\nsrc/namespace1/namespace2/package1/__init.py__:NN: error: Skipping analyzing \"namespace1\": found module but no type hints of library stubs\r\n```\r\n\r\nAll of my code is in the `src` directory. In my `pyproject.toml`, I have `namespace_packages = true` and `mypy_path = [\"src\"]`. The above error only happens if I try to specify a file or directory to check. If instead I use `-p namespace1` (or `-p namespace1.namespace2`), everything is located, loaded, and typechecked successfully.","author":{"url":"https://github.com/akkornel","@type":"Person","name":"akkornel"},"datePublished":"2021-06-28T05:01:40Z","url":"https://github.com/python/mypy/issues/10728"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8293c51f-cd5e-36cd-a585-0f55f66dffd2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C800:C5FC2:22B1A4D:2DE4B6D:6B005134 |
| html-safe-nonce | 059383cabc15d75c803c3ec6022a56d405351c7f3e9a716638d20abcbc58d1e4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODAwOkM1RkMyOjIyQjFBNEQ6MkRFNEI2RDo2QjAwNTEzNCIsInZpc2l0b3JfaWQiOiIxMTI3MDU2Njk3OTQ5NDQyMzU2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5ba8dbfebf44f0aec7eb321c83a92eb0f949c110b9d8d20b780a0f54bc2d86ac |
| hovercard-subject-tag | issue:931171421 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/mypy/10728/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6621bf026114a1c33cf47d37037fd0e3c92d4ea2ecef4e41ff6f10c1675cb523/python/mypy/issues/10728 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6621bf026114a1c33cf47d37037fd0e3c92d4ea2ecef4e41ff6f10c1675cb523/python/mypy/issues/10728 |
| og:image:alt | Feature Allow listing modules/packages to check, within the MyPy config files. Pitch Today, it is possible to use the files config item (in mypy.ini, pyproject.toml, etc.) to tell MyPy what files t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | akkornel |
| hostname | github.com |
| expected-hostname | github.com |
| None | f420f4996e6b1ff1ccd6d7683f8134f4b5f0f8a50124c210dbfe7490e5644abb |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 26e00df917aba0f128135dc073ea0c5e33a70d40 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width