Skip to content
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

Merged
merged 5 commits into from
Aug 10, 2023

Conversation

hauntsaninja
Copy link
Collaborator

Fixes #15343

@github-actions

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",
Copy link
Contributor

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.

@github-actions
Copy link
Contributor

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
Copy link
Contributor

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

@hauntsaninja hauntsaninja merged commit c7d2fa1 into python:master Aug 10, 2023
17 checks passed
@hauntsaninja hauntsaninja deleted the gcndb branch August 10, 2023 18:32
hauntsaninja added a commit to falsedrow/mypy that referenced this pull request Oct 25, 2024
hauntsaninja added a commit to falsedrow/mypy that referenced this pull request Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

types-google-cloud-ndb is recommended incorrectly
2 participants