Skip to content
This repository was archived by the owner on Aug 25, 2026. It is now read-only.

fix: unignore 'google.api_core', '*_pb' and 'grpc' imports - #1132

Closed
parthea wants to merge 13 commits into
mainfrom
typing-unignore-api-core-and-protobuf
Closed

fix: unignore 'google.api_core', '*_pb' and 'grpc' imports#1132
parthea wants to merge 13 commits into
mainfrom
typing-unignore-api-core-and-protobuf

Conversation

@parthea

@parthea parthea commented Jan 15, 2022

Copy link
Copy Markdown
Contributor

Similar to PR #1066, this PR removes # type: ignore from imports where they are no longer needed. See https://github.com/googleapis/python-datastore/pull/255/files

@parthea

parthea commented Jan 18, 2022

Copy link
Copy Markdown
Contributor Author

Hi @busunkim96 , Please could you review/approve?

@busunkim96

Copy link
Copy Markdown
Contributor

Hey @parthea, I think #1096 needs to land before this PR, otherwise it's hard to tell how this will impact a mypy check over the generated code. Do you have the bandwidth to take over that PR?

Otherwise this could be scoped down to just un-ignore the imports in the generator code (not template code) since that is already mypy checked in CI.

@parthea

parthea commented Jan 26, 2022

Copy link
Copy Markdown
Contributor Author

I've closed #1096 and pulled the changes into this PR

@parthea

parthea commented Jan 26, 2022

Copy link
Copy Markdown
Contributor Author
Run nox -s showcase_mypy
nox > Running session showcase_mypy
nox > Session showcase_mypy skipped: Python interpreter 3.9 not found.
@parthea

parthea commented Jan 26, 2022

Copy link
Copy Markdown
Contributor Author
nox > Running session mypy
nox > Creating virtual environment (virtualenv) using python3.9 in .nox/mypy
nox > python -m pip install mypy types-protobuf types-PyYAML types-dataclasses
nox > python -m pip install .
nox > mypy gapic
gapic/schema/wrappers.py:773: error: Invalid type comment or annotation
gapic/schema/wrappers.py:779: error: Invalid type comment or annotation
gapic/schema/wrappers.py:782: error: Name "wrappers" is not defined
gapic/schema/wrappers.py:845: error: Incompatible return value type (got "Dict[Any, Any]", expected "str")
gapic/schema/api.py:632: error: Argument 3 to "ChainMap" has incompatible type "*List[Mapping[str, EnumType]]"; expected "MutableMapping[str, EnumType]"
gapic/schema/api.py:638: error: Argument 3 to "ChainMap" has incompatible type "*List[Mapping[str, MessageType]]"; expected "MutableMapping[str, MessageType]"
Found 6 errors in 2 files (checked 35 source files)
nox > Command mypy gapic failed with exit code 1
nox > Session mypy failed.
Error: Process completed with exit code 1.
@parthea

parthea commented Jan 26, 2022

Copy link
Copy Markdown
Contributor Author

Wait for #1148

@parthea parthea assigned parthea and unassigned busunkim96 Jan 28, 2022
@parthea

parthea commented Mar 15, 2022

Copy link
Copy Markdown
Contributor Author

I'm going to close this PR and re-open it once it's ready

@parthea parthea closed this Mar 15, 2022
@parthea
parthea deleted the typing-unignore-api-core-and-protobuf branch November 27, 2025 15:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants