-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix over eager types-google-cloud-ndb suggestion #15347
Conversation
This comment has been minimized.
This comment has been minimized.
@@ -116,7 +116,7 @@ def stub_package_name(prefix: str) -> str: | |||
"flask_sqlalchemy": "types-Flask-SQLAlchemy", | |||
"fpdf": "types-fpdf2", | |||
"gdb": "types-gdb", | |||
"google.cloud": "types-google-cloud-ndb", | |||
"google.cloud.ndb": "types-google-cloud-ndb", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to update the comment above re: a.b.
for more information, see https://pre-commit.ci
Diff from mypy_primer, showing the effect of this PR on open source code: scrapy (https://github.com/scrapy/scrapy)
+ scrapy/utils/ssl.py:3: error: Library stubs not installed for "OpenSSL._util" [import-untyped]
+ scrapy/utils/ssl.py:3: note: Hint: "python3 -m pip install types-pyOpenSSL"
+ scrapy/utils/ssl.py:3: note: (or run "mypy --install-types" to install all missing stub packages)
+ scrapy/utils/ssl.py:3: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
|
# Don't honor a global (not per-module) ignore_missing_imports | ||
# setting for modules that used to have bundled stubs, as | ||
# otherwise updating mypy can silently result in new false | ||
# negatives. (Unless there are stubs but they are incomplete.) | ||
global_ignore_missing_imports = manager.options.ignore_missing_imports | ||
if ( | ||
(is_legacy_bundled_package(top_level) or is_legacy_bundled_package(second_level)) | ||
any( | ||
".".join(id_components[:i]) in legacy_bundled_packages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered if the iteration could be wrapped in a func but can't think of a name that's clearer than the literal code
Fixes #15343