Skip to content

Commit 18b8277

Browse files
authored
test: add mypy test scenario (#476)
* test: add mypy test scenario * chore: remove ignore type from api_core imports
1 parent 9aa49e2 commit 18b8277

23 files changed

Lines changed: 70 additions & 49 deletions

packages/google-cloud-firestore/google/cloud/firestore_v1/_helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
import json
1919

2020
import google
21-
from google.api_core.datetime_helpers import DatetimeWithNanoseconds # type: ignore
22-
from google.api_core import gapic_v1 # type: ignore
21+
from google.api_core.datetime_helpers import DatetimeWithNanoseconds
22+
from google.api_core import gapic_v1
2323
from google.protobuf import struct_pb2
2424
from google.type import latlng_pb2 # type: ignore
2525
import grpc # type: ignore

packages/google-cloud-firestore/google/cloud/firestore_v1/async_batch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"""Helpers for batch requests to the Google Cloud Firestore API."""
1616

1717

18-
from google.api_core import gapic_v1 # type: ignore
19-
from google.api_core import retry as retries # type: ignore
18+
from google.api_core import gapic_v1
19+
from google.api_core import retry as retries
2020

2121
from google.cloud.firestore_v1.base_batch import BaseWriteBatch
2222

packages/google-cloud-firestore/google/cloud/firestore_v1/async_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
:class:`~google.cloud.firestore_v1.async_document.AsyncDocumentReference`
2525
"""
2626

27-
from google.api_core import gapic_v1 # type: ignore
28-
from google.api_core import retry as retries # type: ignore
27+
from google.api_core import gapic_v1
28+
from google.api_core import retry as retries
2929

3030
from google.cloud.firestore_v1.base_client import (
3131
BaseClient,

packages/google-cloud-firestore/google/cloud/firestore_v1/async_collection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
"""Classes for representing collections for the Google Cloud Firestore API."""
1616

17-
from google.api_core import gapic_v1 # type: ignore
18-
from google.api_core import retry as retries # type: ignore
17+
from google.api_core import gapic_v1
18+
from google.api_core import retry as retries
1919

2020
from google.cloud.firestore_v1.base_collection import (
2121
BaseCollectionReference,

packages/google-cloud-firestore/google/cloud/firestore_v1/async_document.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
import datetime
1717
import logging
1818

19-
from google.api_core import gapic_v1 # type: ignore
20-
from google.api_core import retry as retries # type: ignore
19+
from google.api_core import gapic_v1
20+
from google.api_core import retry as retries
2121
from google.cloud._helpers import _datetime_to_pb_timestamp # type: ignore
2222

2323
from google.cloud.firestore_v1.base_document import (

packages/google-cloud-firestore/google/cloud/firestore_v1/async_query.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
a more common way to create a query than direct usage of the constructor.
2020
"""
2121

22-
from google.api_core import gapic_v1 # type: ignore
23-
from google.api_core import retry as retries # type: ignore
22+
from google.api_core import gapic_v1
23+
from google.api_core import retry as retries
2424

2525
from google.cloud import firestore_v1
2626
from google.cloud.firestore_v1.base_query import (

packages/google-cloud-firestore/google/cloud/firestore_v1/async_transaction.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
import asyncio
1919
import random
2020

21-
from google.api_core import gapic_v1 # type: ignore
22-
from google.api_core import retry as retries # type: ignore
21+
from google.api_core import gapic_v1
22+
from google.api_core import retry as retries
2323

2424
from google.cloud.firestore_v1.base_transaction import (
2525
_BaseTransactional,
@@ -35,7 +35,7 @@
3535
_EXCEED_ATTEMPTS_TEMPLATE,
3636
)
3737

38-
from google.api_core import exceptions # type: ignore
38+
from google.api_core import exceptions
3939
from google.cloud.firestore_v1 import async_batch
4040
from google.cloud.firestore_v1 import _helpers
4141
from google.cloud.firestore_v1 import types

packages/google-cloud-firestore/google/cloud/firestore_v1/base_batch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from typing import Dict, Union
1919

2020
# Types needed only for Type Hints
21-
from google.api_core import retry as retries # type: ignore
21+
from google.api_core import retry as retries
2222
from google.cloud.firestore_v1 import _helpers
2323
from google.cloud.firestore_v1.base_document import BaseDocumentReference
2424

packages/google-cloud-firestore/google/cloud/firestore_v1/base_client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
import grpc # type: ignore
2929

3030
from google.auth.credentials import AnonymousCredentials
31-
import google.api_core.client_options # type: ignore
32-
import google.api_core.path_template # type: ignore
33-
from google.api_core import retry as retries # type: ignore
34-
from google.api_core.gapic_v1 import client_info # type: ignore
31+
import google.api_core.client_options
32+
import google.api_core.path_template
33+
from google.api_core import retry as retries
34+
from google.api_core.gapic_v1 import client_info
3535
from google.cloud.client import ClientWithProject # type: ignore
3636

3737
from google.cloud.firestore_v1 import _helpers
@@ -141,7 +141,7 @@ def __init__(
141141
self._client_info = client_info
142142
if client_options:
143143
if type(client_options) == dict:
144-
client_options = google.api_core.client_options.from_dict( # type: ignore
144+
client_options = google.api_core.client_options.from_dict(
145145
client_options
146146
)
147147
self._client_options = client_options
@@ -232,7 +232,7 @@ def _database_string(self):
232232
project. (The default database is also in this string.)
233233
"""
234234
if self._database_string_internal is None:
235-
db_str = google.api_core.path_template.expand( # type: ignore
235+
db_str = google.api_core.path_template.expand(
236236
"projects/{project}/databases/{database}",
237237
project=self.project,
238238
database=self._database,

packages/google-cloud-firestore/google/cloud/firestore_v1/base_collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import random
1717
import sys
1818

19-
from google.api_core import retry as retries # type: ignore
19+
from google.api_core import retry as retries
2020

2121
from google.cloud.firestore_v1 import _helpers
2222
from google.cloud.firestore_v1.document import DocumentReference

0 commit comments

Comments
 (0)