Skip to content

Commit 4c33ae8

Browse files
committed
chore: fix mypy check
1 parent f112a85 commit 4c33ae8

File tree

2 files changed

+1
-59
lines changed

2 files changed

+1
-59
lines changed

google/cloud/firestore_v1/services/firestore/transports/rest_base.py

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -483,63 +483,6 @@ def _get_query_params_json(transcoded_request):
483483
query_params["$alt"] = "json;enum-encoding=int"
484484
return query_params
485485

486-
class _BaseExecutePipeline:
487-
def __hash__(self): # pragma: NO COVER
488-
return NotImplementedError("__hash__ must be implemented.")
489-
490-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
491-
492-
@classmethod
493-
def _get_unset_required_fields(cls, message_dict):
494-
return {
495-
k: v
496-
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
497-
if k not in message_dict
498-
}
499-
500-
@staticmethod
501-
def _get_http_options():
502-
http_options: List[Dict[str, str]] = [
503-
{
504-
"method": "post",
505-
"uri": "/v1/{database=projects/*/databases/*}/documents:executePipeline",
506-
"body": "*",
507-
},
508-
]
509-
return http_options
510-
511-
@staticmethod
512-
def _get_transcoded_request(http_options, request):
513-
pb_request = firestore.ExecutePipelineRequest.pb(request)
514-
transcoded_request = path_template.transcode(http_options, pb_request)
515-
return transcoded_request
516-
517-
@staticmethod
518-
def _get_request_body_json(transcoded_request):
519-
# Jsonify the request body
520-
521-
body = json_format.MessageToJson(
522-
transcoded_request["body"], use_integers_for_enums=True
523-
)
524-
return body
525-
526-
@staticmethod
527-
def _get_query_params_json(transcoded_request):
528-
query_params = json.loads(
529-
json_format.MessageToJson(
530-
transcoded_request["query_params"],
531-
use_integers_for_enums=True,
532-
)
533-
)
534-
query_params.update(
535-
_BaseFirestoreRestTransport._BaseExecutePipeline._get_unset_required_fields(
536-
query_params
537-
)
538-
)
539-
540-
query_params["$alt"] = "json;enum-encoding=int"
541-
return query_params
542-
543486
class _BaseGetDocument:
544487
def __hash__(self): # pragma: NO COVER
545488
return NotImplementedError("__hash__ must be implemented.")

tests/unit/v1/test_pipeline_source.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
from google.cloud.firestore_v1.pipeline_source import PipelineSource
1717
from google.cloud.firestore_v1.pipeline import Pipeline
1818
from google.cloud.firestore_v1.async_pipeline import AsyncPipeline
19-
from google.cloud.firestore_v1.client import Client
20-
from google.cloud.firestore_v1.async_client import AsyncClient
2119
from google.cloud.firestore_v1 import pipeline_stages as stages
2220
from google.cloud.firestore_v1.base_document import BaseDocumentReference
2321
from google.cloud.firestore_v1.query import Query
@@ -26,6 +24,7 @@
2624
from tests.unit.v1._test_helpers import make_async_client
2725
from tests.unit.v1._test_helpers import make_client
2826

27+
2928
class TestPipelineSource:
3029
_expected_pipeline_type = Pipeline
3130

0 commit comments

Comments
 (0)