Title: exclude should imply a per-module follow import skip for matching modules · Issue #10377 · python/mypy · GitHub
Open Graph Title: exclude should imply a per-module follow import skip for matching modules · Issue #10377 · python/mypy
X Title: exclude should imply a per-module follow import skip for matching modules · Issue #10377 · python/mypy
Description: Bug Report I recently converted this project (linked to at the most recent commit) from a plain script to a Python package. This included adding an un-annotated _version.py file generated by versioneer to the package. mypy (when run as m...
Open Graph Description: Bug Report I recently converted this project (linked to at the most recent commit) from a plain script to a Python package. This included adding an un-annotated _version.py file generated by versio...
X Description: Bug Report I recently converted this project (linked to at the most recent commit) from a plain script to a Python package. This included adding an un-annotated _version.py file generated by versio...
Opengraph URL: https://github.com/python/mypy/issues/10377
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"exclude should imply a per-module follow import skip for matching modules","articleBody":"**Bug Report**\r\n\r\nI recently converted [this project](https://github.com/con/tinuous/tree/97538692451f968607a2c289e0ad80fb9d2e1e32) (linked to at the most recent commit) from a plain script to a Python package. This included adding an un-annotated `_version.py` file generated by versioneer to the package. mypy (when run as `mypy src`) now reports errors due to `_version.py` lacking any type annotations, and I cannot get it to ignore that file.\r\n\r\nWhat I've tried:\r\n\r\n* Adding `exclude = _version.py` to the `[mypy]` section in `setup.cfg`\r\n* Adding `exclude = src/tinuous/_version.py` to the `[mypy]` section\r\n* Adding `exclude = src/tinuous/_(version|_init__).py` to the `[mypy]` section\r\n* Running just `mypy src/tinuous/__main__.py`\r\n* Running `mypy --exclude _version.py src`\r\n\r\nIn all of these cases, mypy spits out errors relating to `_version.py` even though I thought I told it to ignore that file.\r\n\r\n**Your Environment**\r\n\r\n- Mypy version used: 0.812\r\n- Mypy command-line flags: `--exclude` or nothing\r\n- Mypy configuration options from `mypy.ini` (and other config files):\r\n\r\n```\r\n[mypy]\r\nignore_missing_imports = True\r\ndisallow_untyped_defs = True\r\ndisallow_incomplete_defs = True\r\nno_implicit_optional = True\r\nwarn_redundant_casts = True\r\nwarn_return_any = True\r\nwarn_unreachable = True\r\nlocal_partial_types = True\r\nno_implicit_reexport = True\r\nstrict_equality = True\r\nshow_error_codes = True\r\nshow_traceback = True\r\npretty = True\r\nplugins = pydantic.mypy\r\n# Various \"exclude\" options (see above)\r\n```\r\n\r\n- Python version used: 3.9.4\r\n- Operating system and version: macOS 11.2.1","author":{"url":"https://github.com/jwodder","@type":"Person","name":"jwodder"},"datePublished":"2021-04-27T21:16:22Z","url":"https://github.com/python/mypy/issues/10377"}
| 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:269ce6d8-ce55-a8c9-7798-e7f3aeceaa04 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C8B2:1A77D:47623A:5F7BBA:6B002CF8 |
| html-safe-nonce | cd414673279c95c1994d6dc7ec9600dedcba77dc0c169c3e47cf128108e377d6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOEIyOjFBNzdEOjQ3NjIzQTo1RjdCQkE6NkIwMDJDRjgiLCJ2aXNpdG9yX2lkIjoiNzI1MDY5OTk1MDUwODQ4NTg4MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e278e7c4e6721b9d59560d861e90060d79b04af0e4ae1e7ca6d641675c67bfdb |
| hovercard-subject-tag | issue:869271201 |
| 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/10377/issue_layout |
| twitter:image | https://opengraph.githubassets.com/94fd43191f189a0480c0e2c8121d3e2c2d9b9b4c7af7c385c8d7b31fd98418f9/python/mypy/issues/10377 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/94fd43191f189a0480c0e2c8121d3e2c2d9b9b4c7af7c385c8d7b31fd98418f9/python/mypy/issues/10377 |
| og:image:alt | Bug Report I recently converted this project (linked to at the most recent commit) from a plain script to a Python package. This included adding an un-annotated _version.py file generated by versio... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jwodder |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| 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 | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width