-
Notifications
You must be signed in to change notification settings - Fork 1.7k
chore(generator): centralize mypy configuration and regenerate google-cloud-datastore POC #17408
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
Open
chalmerlowe
wants to merge
10
commits into
main
Choose a base branch
from
feat/centralize-mypy
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d728983
feat: centralize mypy config and update templates
chalmerlowe f1c0d41
feat: delete mypy.ini templates and goldens
chalmerlowe 779e62a
fix: remove mypy.ini from datastore post-processing
chalmerlowe 485e7db
feat(datastore): regenerate package with centralized mypy.ini POC
chalmerlowe 9b403cb
fix: add google.type to mypy ignores
chalmerlowe cd574c9
feat(generator): introduce MYPY_CONFIG_FILE constant in templates
chalmerlowe 8a618a5
feat(datastore): update noxfile.py to use dynamic MYPY_CONFIG_FILE
chalmerlowe 5ae98b5
test(generator): update integration test goldens with centralized myp…
chalmerlowe 971e416
test(generator): remove extra blank line in integration test golden n…
chalmerlowe 6244206
chore(generator): clean up centralized mypy.ini structure and overrides
chalmerlowe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| [mypy] | ||
| namespace_packages = True | ||
| ignore_missing_imports = False | ||
|
|
||
| # Helps mypy navigate the "google" namespace more reliably in 3.10+ | ||
| explicit_package_bases = True | ||
|
|
||
| # Performance: reuse results from previous runs to speed up "nox" | ||
| incremental = True | ||
|
|
||
| exclude = (?x)( | ||
| (^|/)third_party/ | ||
| | (^|/)tests/unit/resources/ | ||
| | (^|/)tests/unit/gapic/ | ||
| ) | ||
|
|
||
|
|
||
| # ============================================================================== | ||
| # GLOBAL THIRD-PARTY & SHARED LIBRARY IGNORES | ||
| # ============================================================================== | ||
|
|
||
| [mypy-anywidget] | ||
| ignore_missing_imports = True | ||
|
|
||
| [mypy-cloudpickle.*] | ||
| ignore_missing_imports = True | ||
|
|
||
| [mypy-flask] | ||
| ignore_missing_imports = True | ||
|
|
||
| [mypy-google.auth.*] | ||
| ignore_missing_imports = True | ||
|
|
||
| [mypy-google.cloud.bigtable] | ||
| ignore_missing_imports = True | ||
|
|
||
| [mypy-google.cloud.pubsub] | ||
| ignore_missing_imports = True | ||
|
|
||
| [mypy-google.colab] | ||
| ignore_missing_imports = True | ||
|
|
||
| [mypy-google.iam.*] | ||
| ignore_missing_imports = True | ||
|
|
||
| [mypy-google.longrunning.*] | ||
| ignore_missing_imports = True | ||
|
|
||
| [mypy-google.oauth2.*] | ||
| ignore_missing_imports = True | ||
|
|
||
| [mypy-google.protobuf.*] | ||
| ignore_missing_imports = True | ||
|
|
||
| [mypy-google.rpc.*] | ||
| ignore_missing_imports = True | ||
|
|
||
| [mypy-google.type.*] | ||
| ignore_missing_imports = True | ||
|
|
||
| [mypy-grpc.*] | ||
| ignore_missing_imports = True | ||
|
|
||
| [mypy-ibis.*] | ||
| ignore_missing_imports = True | ||
|
|
||
| [mypy-ipywidgets] | ||
| ignore_missing_imports = True | ||
|
|
||
| [mypy-proto.*] | ||
| ignore_missing_imports = True | ||
|
|
||
| [mypy-pyarrow.*] | ||
| ignore_missing_imports = True | ||
|
|
||
| [mypy-pydata_google_auth] | ||
| ignore_missing_imports = True | ||
|
|
||
| [mypy-pytest] | ||
| ignore_missing_imports = True | ||
|
|
||
| [mypy-pytz] | ||
| ignore_missing_imports = True | ||
|
|
||
|
|
||
| # ============================================================================== | ||
| # PACKAGE-SPECIFIC OVERRIDES & EXCEPTIONS | ||
| # ============================================================================== | ||
|
|
||
| # --- google-cloud-bigtable --- | ||
| [mypy-google.cloud.bigtable.*] | ||
| ignore_errors = True | ||
|
|
||
| [mypy-google.cloud.bigtable.data.*] | ||
| check_untyped_defs = True | ||
| warn_unreachable = True | ||
| disallow_any_generics = True | ||
| ignore_errors = False | ||
|
|
||
| # --- google-cloud-datastore --- | ||
| [mypy-google.cloud.datastore._app_engine_key_pb2] | ||
| ignore_errors = True | ||
|
|
||
| # TODO(https://github.com/googleapis/gapic-generator-python/issues/2410): | ||
| # Remove once this generator bug is fixed | ||
| [mypy-google.cloud.datastore_v1.services.datastore.async_client] | ||
| ignore_errors = True | ||
|
|
||
| [mypy-google.cloud.datastore_v1.services.datastore.client] | ||
| ignore_errors = True | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
packages/gapic-generator/tests/integration/goldens/asset/mypy.ini
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
packages/gapic-generator/tests/integration/goldens/credentials/mypy.ini
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
packages/gapic-generator/tests/integration/goldens/eventarc/mypy.ini
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
packages/gapic-generator/tests/integration/goldens/logging/mypy.ini
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
packages/gapic-generator/tests/integration/goldens/logging_internal/mypy.ini
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
packages/gapic-generator/tests/integration/goldens/redis/mypy.ini
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.