8000 chore: strip unnecessary 'type: ignore' comments by tseaver · Pull Request #255 · googleapis/python-datastore · GitHub
[go: up one dir, main page]

Skip to content

chore: strip unnecessary 'type: ignore' comments #255

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

Merged
merged 1 commit into from
Nov 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion google/cloud/datastore/_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from google.rpc import status_pb2 # type: ignore

from google.cloud import _http as connection_module
from google.cloud import exceptions # type: ignore
from google.cloud import exceptions
from google.cloud.datastore_v1.types import datastore as _datastore_pb2


Expand Down
6 changes: 3 additions & 3 deletions google/cloud/datastore/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

import google.api_core.client_options
from google.auth.credentials import AnonymousCredentials # type: ignore
from google.cloud._helpers import _LocalStack # type: ignore
from google.cloud._helpers import _determine_default_project as _base_default_project # type: ignore
from google.cloud.client import ClientWithProject # type: ignore
from google.cloud._helpers import _LocalStack
from google.cloud._helpers import _determine_default_project as _base_default_project
from google.cloud.client import ClientWithProject
from google.cloud.datastore.version import __version__
from google.cloud.datastore import helpers
from google.cloud.datastore._http import HTTPData 8000 storeAPI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

from google.api_core import operation # type: ignore
from google.api_core import operation_async # type: ignore
from google.api_core import operation
from google.api_core import operation_async
from google.cloud.datastore_admin_v1.services.datastore_admin import pagers
from google.cloud.datastore_admin_v1.types import datastore_admin
from google.cloud.datastore_admin_v1.types import index
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf import empty_pb2
from .transports.base import DatastoreAdminTransport, DEFAULT_CLIENT_INFO
from .transports.grpc_asyncio import DatastoreAdminGrpcAsyncIOTransport
from .client import DatastoreAdminClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

from google.api_core import operation # type: ignore
from google.api_core import operation_async # type: ignore
from google.api_core import operation
from google.api_core import operation_async
from google.cloud.datastore_admin_v1.services.datastore_admin import pagers
from google.cloud.datastore_admin_v1.types import datastore_admin
from google.cloud.datastore_admin_v1.types import index
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf import empty_pb2
from .transports.base import DatastoreAdminTransport, DEFAULT_CLIENT_INFO
from .transports.grpc import DatastoreAdminGrpcTransport
from .transports.grpc_asyncio import DatastoreAdminGrpcAsyncIOTransport
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

from google.cloud.datastore_admin_v1.types import datastore_admin
from google.cloud.datastore_admin_v1.types import index
from google.longrunning import operations_pb2 # type: ignore
from google.longrunning import operations_pb2

try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
from google.auth import credentials as ga_credentials # type: ignore
from google.auth.transport.grpc import SslCredentials # type: ignore

import grpc # type: ignore
import grpc

from google.cloud.datastore_admin_v1.types import datastore_admin
from google.cloud.datastore_admin_v1.types import index
from google.longrunning import operations_pb2 # type: ignore
from google.longrunning import operations_pb2
from .base import DatastoreAdminTransport, DEFAULT_CLIENT_INFO


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
from google.auth import credentials as ga_credentials # type: ignore
from google.auth.transport.grpc import SslCredentials # type: ignore

import grpc # type: ignore
from grpc.experimental import aio # type: ignore
import grpc
from grpc.experimental import aio

from google.cloud.datastore_admin_v1.types import datastore_admin
from google.cloud.datastore_admin_v1.types import index
from google.longrunning import operations_pb2 # type: ignore
from google.longrunning import operations_pb2
from .base import DatastoreAdminTransport, DEFAULT_CLIENT_INFO
from .grpc import DatastoreAdminGrpcTransport

Expand Down
4 changes: 2 additions & 2 deletions google/cloud/datastore_admin_v1/types/datastore_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import proto # type: ignore
import proto

from google.cloud.datastore_admin_v1.types import index as gda_index
from google.protobuf import timestamp_pb2 # type: ignore
from google.protobuf import timestamp_pb2


__protobuf__ = proto.module(
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/datastore_admin_v1/types/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import proto # type: ignore
import proto


__protobuf__ = proto.module(package="google.datastore.admin.v1", manifest={"Index",},)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from google.auth import credentials as ga_credentials # type: ignore
from google.auth.transport.grpc import SslCredentials # type: ignore

import grpc # type: ignore
import grpc

from google.cloud.datastore_v1.types import datastore
from .base import DatastoreTransport, DEFAULT_CLIENT_INFO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
from google.auth import credentials as ga_credentials # type: ignore
from google.auth.transport.grpc import SslCredentials # type: ignore

import grpc # type: ignore
from grpc.experimental import aio # type: ignore
import grpc
from grpc.experimental import aio

from google.cloud.datastore_v1.types import datastore
from .base import DatastoreTransport, DEFAULT_CLIENT_INFO
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/datastore_v1/types/datastore.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import proto # type: ignore
import proto

from google.cloud.datastore_v1.types import entity
from google.cloud.datastore_v1.types import query as gd_query
Expand Down
8 changes: 4 additions & 4 deletions google/cloud/datastore_v1/types/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import proto # type: ignore
import proto

from google.protobuf import struct_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore
from google.type import latlng_pb2 # type: ignore
from google.protobuf import struct_pb2
from google.protobuf import timestamp_pb2
from google.type import latlng_pb2


__protobuf__ = proto.module(
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/datastore_v1/types/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import proto # type: ignore
import proto

from google.cloud.datastore_v1.types import entity as gd_entity
from google.protobuf import wrappers_pb2 # type: ignore
from google.protobuf import wrappers_pb2


__protobuf__ = proto.module(
Expand Down
4 changes: 2 additions & 2 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ python_version = 3.6
namespace_packages = True
ignore_missing_imports = True

[mypy-google.protobuf]
ignore_missing_imports = True
[mypy-google.cloud.datastore._app_engine_key_pb2]
ignore_errors = True
4 changes: 3 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ def blacken(session):
def mypy(session):
"""Verify type hints are mypy compatible."""
session.install("-e", ".")
session.install("mypy", "types-setuptools", "types-mock", "types-requests")
session.install(
"mypy", "types-setuptools", "types-mock", "types-protobuf", "types-requests"
)
session.run("mypy", "google/", "tests/")


Expand Down
4 changes: 3 additions & 1 deletion owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,9 @@ def lint_setup_py\(session\):
def mypy(session):
"""Verify type hints are mypy compatible."""
session.install("-e", ".")
session.install("mypy", "types-setuptools", "types-mock", "types-requests")
session.install(
"mypy", "types-setuptools", "types-mock", "types-protobuf", "types-requests"
)
session.run("mypy", "google/", "tests/")


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from google.api_core import gapic_v1
from google.api_core import grpc_helpers
from google.api_core import grpc_helpers_async
from google.api_core import operation_async # type: ignore
from google.api_core import operation_async
from google.api_core import operations_v1
from google.api_core import path_template
from google.auth import credentials as ga_credentials
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/gapic/datastore_v1/test_datastore.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
from google.cloud.datastore_v1.types import entity
from google.cloud.datastore_v1.types import query
from google.oauth2 import service_account
from google.protobuf import struct_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore
from google.protobuf import wrappers_pb2 # type: ignore
from google.type import latlng_pb2 # type: ignore
from google.protobuf import struct_pb2
from google.protobuf import timestamp_pb2
from google.protobuf import wrappers_pb2
from google.type import latlng_pb2
import google.auth


Expand Down
0