You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src/foo.py:6: error: Library stubs not installed for "google.cloud" [import]
src/foo.py:6: note: Hint: "python3 -m pip install types-google-cloud-ndb"
src/foo.py:6: note: (or run "mypy --install-types" to install all missing stub packages)
However installing types-google-cloud-ndb does not fix this.
To Reproduce
Import from google.cloud import pubsub_v1 from google-cloud-pubsub and run mypy.
Expected Behavior
In this case, no stubs/types package exists for this import, so it should suggest nothing.
You can see here that adding type hints/stubs for google.cloud has not been completed.
Actual Behavior
Because types-google-cloud-ndb is specifically for a different Google library installed via from google.cloud import ndb, see its README, this suggestion is incorrect.
This is a PEP 561 type stub package for the google-cloud-ndb package.
Your Environment
Mypy version used: 1.5.0
Mypy command-line flags: None
Python version used: 3.9.17
The text was updated successfully, but these errors were encountered:
Bug Report
I use a Google Cloud import:
and import it like so:
When running mypy it says:
However installing
types-google-cloud-ndb
does not fix this.To Reproduce
Import
from google.cloud import pubsub_v1
fromgoogle-cloud-pubsub
and run mypy.Expected Behavior
In this case, no stubs/types package exists for this import, so it should suggest nothing.
You can see here that adding type hints/stubs for google.cloud has not been completed.
Actual Behavior
Because
types-google-cloud-ndb
is specifically for a different Google library installed viafrom google.cloud import ndb
, see its README, this suggestion is incorrect.Your Environment
The text was updated successfully, but these errors were encountered: