Title: MYPYPATH not working with local -stubs package · Issue #5386 · python/mypy · GitHub
Open Graph Title: MYPYPATH not working with local -stubs package · Issue #5386 · python/mypy
X Title: MYPYPATH not working with local -stubs package · Issue #5386 · python/mypy
Description: This is a bug report. However, if the current behavior is not a bug, then this is request to improve documentation. Description Mypy doesn't recognise my local library typing stub. Reproduction: Actual Python file import aiomysql Directo...
Open Graph Description: This is a bug report. However, if the current behavior is not a bug, then this is request to improve documentation. Description Mypy doesn't recognise my local library typing stub. Reproduction: Ac...
X Description: This is a bug report. However, if the current behavior is not a bug, then this is request to improve documentation. Description Mypy doesn't recognise my local library typing stub. Reproduction...
Opengraph URL: https://github.com/python/mypy/issues/5386
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"MYPYPATH not working with local -stubs package","articleBody":"This is a bug report. However, if the current behavior is not a bug, then this is request to improve documentation.\r\n\r\n## Description\r\n\r\nMypy doesn't recognise my local library typing stub.\r\n\r\n## Reproduction:\r\n\r\n### Actual Python file\r\n\r\n```python\r\nimport aiomysql\r\n```\r\n\r\n### Directory tree\r\n```\r\npythonlibtypes/\r\n└── aiomysql-stubs\r\n ├── __init__.pyi\r\n ├── connection.pyi\r\n ├── cursors.pyi\r\n ├── pool.pyi\r\n ├── py.typed\r\n └── utils.pyi\r\n```\r\n\r\n### Mypy command\r\n\r\n```\r\nMYPYPATH=\"/path/to/project/pythonlibtypes/\" pipenv run -- mypy --config mypy.ini module_to_check\r\n```\r\n\r\n`mypy.ini`:\r\n\r\n```\r\n[mypy]\r\nwarn_redundant_casts = True\r\nwarn_unused_ignores = True\r\nincremental = True\r\nfollow_imports = normal\r\n```\r\n\r\n## Actual behavior\r\n\r\n```\r\npath/to/file.py:1: error: Cannot find module named 'aiomysql'\r\n```\r\n\r\n## Expected behavior\r\n\r\nImport succeeds, Mypy uses the stub \r\n\r\n## Versions\r\n\r\nPython 3.6.5\r\n\r\nmypy 0.620\r\n","author":{"url":"https://github.com/Dentosal","@type":"Person","name":"Dentosal"},"datePublished":"2018-07-24T13:59:32Z","url":"https://github.com/python/mypy/issues/5386"}
| 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:cc795e52-acc0-c41d-862b-e91207d1918e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D3EE:2D8919:514AEA:6CFBAB:6B00300E |
| html-safe-nonce | c3854612d6f0ba90809777079598bf5a64b36b32d45a138a6695d115d9efac43 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEM0VFOjJEODkxOTo1MTRBRUE6NkNGQkFCOjZCMDAzMDBFIiwidmlzaXRvcl9pZCI6IjcyNzE3OTI3MzI0Njc2MzgyODYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c2d31864c98471773cb6d7eea66a41a4da474f4de2635f38f39a70f4865e938a |
| hovercard-subject-tag | issue:344050282 |
| 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/5386/issue_layout |
| twitter:image | https://opengraph.githubassets.com/18b8df5a1accb5b0e7185d1c00b57302f64cada6020ecb8b771873f4b5c0485e/python/mypy/issues/5386 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/18b8df5a1accb5b0e7185d1c00b57302f64cada6020ecb8b771873f4b5c0485e/python/mypy/issues/5386 |
| og:image:alt | This is a bug report. However, if the current behavior is not a bug, then this is request to improve documentation. Description Mypy doesn't recognise my local library typing stub. Reproduction: Ac... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Dentosal |
| 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