Title: importing google.cloud.logging causes untyped modules in the namespace to be considered missing · Issue #10360 · python/mypy · GitHub
Open Graph Title: importing google.cloud.logging causes untyped modules in the namespace to be considered missing · Issue #10360 · python/mypy
X Title: importing google.cloud.logging causes untyped modules in the namespace to be considered missing · Issue #10360 · python/mypy
Description: Bug Report To Reproduce with the mypy config: [mypy] [mypy-google.cloud.*] ignore_missing_imports=true and the .py file: from google.cloud import bigquery from google.cloud import logging Actual Behavior I get foo.py:1: error: Module "go...
Open Graph Description: Bug Report To Reproduce with the mypy config: [mypy] [mypy-google.cloud.*] ignore_missing_imports=true and the .py file: from google.cloud import bigquery from google.cloud import logging Actual Be...
X Description: Bug Report To Reproduce with the mypy config: [mypy] [mypy-google.cloud.*] ignore_missing_imports=true and the .py file: from google.cloud import bigquery from google.cloud import logging Actual Be...
Opengraph URL: https://github.com/python/mypy/issues/10360
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"importing google.cloud.logging causes untyped modules in the namespace to be considered missing","articleBody":"**Bug Report**\r\n\r\n\u003c!--\r\nNote: If the problem you are reporting is about a specific library function, then the typeshed tracker is better suited\r\nfor this report: https://github.com/python/typeshed/issues\r\n-->\r\n\r\n\r\n**To Reproduce**\r\n\r\nwith the mypy config:\r\n```ini\r\n[mypy]\r\n\r\n[mypy-google.cloud.*]\r\nignore_missing_imports=true\r\n```\r\n\r\nand the .py file:\r\n\r\n```python\r\nfrom google.cloud import bigquery\r\nfrom google.cloud import logging\r\n```\r\n\r\n**Actual Behavior**\r\n\r\nI get\r\n\r\n```\r\nfoo.py:1: error: Module \"google.cloud\" has no attribute \"bigquery\"\r\n```\r\n\r\nhowever if I comment out:\r\n\r\n\r\n```python\r\nfrom google.cloud import bigquery\r\n# from google.cloud import logging\r\n```\r\n\r\nI get\r\n\r\n```\r\nSuccess: no issues found in 1 source file\r\n```\r\n\r\n**Expected Behavior**\r\n\r\nI don't expect importing a module in a namespace with stubs to affect other modules in that namespace\r\n\r\n(Write what happened.)\r\n\r\n**Your Environment**\r\n\r\n\u003c!-- Include as many relevant details about the environment you experienced the bug in -->\r\n\r\n- Mypy version used: 0.812 and d326952f88214b36d302c7fcbc92320b3c68fa18\r\n- Mypy command-line flags: `mypy.`\r\n- Mypy configuration options from `mypy.ini` (and other config files): see above\r\n- Python version used: Python 3.8.5 (default, Jan 27 2021, 15:41:15) \r\n- Operating system and version: Ubuntu 20.04.2 LTS\r\n\r\n\u003c!--\r\nYou can freely edit this text, please remove all the lines\r\nyou believe are unnecessary.\r\n-->\r\n","author":{"url":"https://github.com/graingert","@type":"Person","name":"graingert"},"datePublished":"2021-04-23T11:07:55Z","url":"https://github.com/python/mypy/issues/10360"}
| 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:633ccfc7-85b9-69ed-c1a5-836bc595854c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D128:2EC689:203A16A:2BA5448:6B001C48 |
| html-safe-nonce | 206ed9e289857144ccbd9ead4827aad920981061916ecb8465706927fc8a9eab |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTI4OjJFQzY4OToyMDNBMTZBOjJCQTU0NDg6NkIwMDFDNDgiLCJ2aXNpdG9yX2lkIjoiNjcwMTM1MzgwMzQ4NjA3NTk3NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d2559266dfd9477ba9e4563d429fedc5f3e0c1be219a0c4740b8d1f694bf84e3 |
| hovercard-subject-tag | issue:866007267 |
| 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/10360/issue_layout |
| twitter:image | https://opengraph.githubassets.com/35ed156ae92b96ac217d0b6560e17cb5911aa4be4ef7a6fdd2e50787d2825918/python/mypy/issues/10360 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/35ed156ae92b96ac217d0b6560e17cb5911aa4be4ef7a6fdd2e50787d2825918/python/mypy/issues/10360 |
| og:image:alt | Bug Report To Reproduce with the mypy config: [mypy] [mypy-google.cloud.*] ignore_missing_imports=true and the .py file: from google.cloud import bigquery from google.cloud import logging Actual Be... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | graingert |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| 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 | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width