Repository: quantumlib/Cirq

Issue:
Add list_processors to integration tests
For reference: PR #2899 fixes a bug due to argument types in list_processors. Issues of this type cannot be caught by mock-based unit tests (likely how it escaped notice to begin with) which means we need to check for it in our integration tests.

Additionally, there are several other methods in the `engine_client.py` file which have similarly-fragile type-agnostic tests. If any of those are not covered in integration tests, they probably should be.


Discussion:
It might also be possible to catch this kind of issue with better type-checking in the affected files. (Honestly, it's a little strange to me that mypy isn't complaining about the lack of type annotation on arguments in `quantum_engine_service_client.py` - we don't appear to have any `type: ignore` directives for that module...)
Discussed with the group - this can be resolved by some combination of forcing keyword arguments (e.g. `func(self, *, [args])`) and improving type annotation of the affected functions.

Note also that mypy does **not** protect against untyped function arguments.

Resolving patch:
diff --git a/cirq/google/engine/client/quantum_v1alpha1/gapic/quantum_engine_service_client.py b/cirq/google/engine/client/quantum_v1alpha1/gapic/quantum_engine_service_client.py
--- a/cirq/google/engine/client/quantum_v1alpha1/gapic/quantum_engine_service_client.py
+++ b/cirq/google/engine/client/quantum_v1alpha1/gapic/quantum_engine_service_client.py
@@ -17,6 +17,8 @@
 
 import functools
 import pkg_resources
+from typing import (Any, Callable, Dict, List, Optional, Sequence, Tuple, Union,
+                    TYPE_CHECKING)
 import warnings
 
 from google.oauth2 import service_account
@@ -30,6 +32,7 @@
 import google.api_core.protobuf_helpers
 import grpc
 
+from cirq.google.engine.client.quantum_v1alpha1 import types as pb_types
 from cirq.google.engine.client.quantum_v1alpha1.gapic import enums
 from cirq.google.engine.client.quantum_v1alpha1.gapic import quantum_engine_service_client_config
 from cirq.google.engine.client.quantum_v1alpha1.gapic.transports import quantum_engine_service_grpc_transport
@@ -42,6 +45,11 @@
 
 _GAPIC_LIBRARY_VERSION = 0.1
 
+QUANTUM_ENGINE_SERVICE_GRPC_TRANSPORT_LIKE = Union[
+    quantum_engine_service_grpc_transport.QuantumEngineServiceGrpcTransport,
+    Callable[..., quantum_engine_service_grpc_transport.
+             QuantumEngineServiceGrpcTransport]]
+
 
 class QuantumEngineServiceClient(object):
     """-"""
@@ -75,12 +83,14 @@ def from_service_account_file(cls, filename, *args, **kwargs):
     from_service_account_json = from_service_account_file
 
     def __init__(self,
-                 transport=None,
-                 channel=None,
-                 credentials=None,
-                 client_config=None,
-                 client_info=None,
-                 client_options=None):
+                 transport: QUANTUM_ENGINE_SERVICE_GRPC_TRANSPORT_LIKE = None,
+                 channel: Optional[grpc.Channel] = None,
+                 credentials: Optional[service_account.Credentials] = None,
+                 client_config: Optional[Dict[str, Any]] = None,
+                 client_info: Optional[
+                     google.api_core.gapic_v1.client_info.ClientInfo] = None,
+                 client_options: Union[Dict[str, Any], google.api_core.
+                                       client_options.ClientOptions] = None):
         """Constructor.
 
         Args:
@@ -179,16 +189,19 @@ def __init__(self,
         # These are the actual callables which invoke the proper
         # transport methods, wrapped with `wrap_method` to add retry,
         # timeout, and the like.
-        self._inner_api_calls = {}
+        self._inner_api_calls: Dict = {}
 
     # Service calls
-    def create_quantum_program(self,
-                               parent=None,
-                               quantum_program=None,
-                               overwrite_existing_source_code=None,
-                               retry=google.api_core.gapic_v1.method.DEFAULT,
-                               timeout=google.api_core.gapic_v1.method.DEFAULT,
-                               metadata=None):
+    def create_quantum_program(
+            self,
+            parent: Optional[str] = None,
+            quantum_program: Union[Dict[str, Any], pb_types.
+                                   QuantumProgram] = None,
+            overwrite_existing_source_code: Optional[bool] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -257,12 +270,14 @@ def create_quantum_program(self,
         return self._inner_api_calls['create_quantum_program'](
             request, retry=retry, timeout=timeout, metadata=metadata)
 
-    def get_quantum_program(self,
-                            name=None,
-                            return_code=None,
-                            retry=google.api_core.gapic_v1.method.DEFAULT,
-                            timeout=google.api_core.gapic_v1.method.DEFAULT,
-                            metadata=None):
+    def get_quantum_program(
+            self,
+            name: Optional[str] = None,
+            return_code: Optional[bool] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -328,13 +343,15 @@ def get_quantum_program(self,
                                                             timeout=timeout,
                                                             metadata=metadata)
 
-    def list_quantum_programs(self,
-                              parent=None,
-                              page_size=None,
-                              filter_=None,
-                              retry=google.api_core.gapic_v1.method.DEFAULT,
-                              timeout=google.api_core.gapic_v1.method.DEFAULT,
-                              metadata=None):
+    def list_quantum_programs(
+            self,
+            parent: Optional[str] = None,
+            page_size: Optional[int] = None,
+            filter_: Optional[str] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -430,12 +447,14 @@ def list_quantum_programs(self,
         )
         return iterator
 
-    def delete_quantum_program(self,
-                               name=None,
-                               delete_jobs=None,
-                               retry=google.api_core.gapic_v1.method.DEFAULT,
-                               timeout=google.api_core.gapic_v1.method.DEFAULT,
-                               metadata=None):
+    def delete_quantum_program(
+            self,
+            name: Optional[str] = None,
+            delete_jobs: Optional[bool] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -498,13 +517,16 @@ def delete_quantum_program(self,
                                                         timeout=timeout,
                                                         metadata=metadata)
 
-    def update_quantum_program(self,
-                               name=None,
-                               quantum_program=None,
-                               update_mask=None,
-                               retry=google.api_core.gapic_v1.method.DEFAULT,
-                               timeout=google.api_core.gapic_v1.method.DEFAULT,
-                               metadata=None):
+    def update_quantum_program(
+            self,
+            name: Optional[str] = None,
+            quantum_program: Union[Dict[str, Any], pb_types.
+                                   QuantumProgram] = None,
+            update_mask: Union[Dict[str, Any], field_mask_pb2.FieldMask] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -576,13 +598,15 @@ def update_quantum_program(self,
         return self._inner_api_calls['update_quantum_program'](
             request, retry=retry, timeout=timeout, metadata=metadata)
 
-    def create_quantum_job(self,
-                           parent=None,
-                           quantum_job=None,
-                           overwrite_existing_run_context=None,
-                           retry=google.api_core.gapic_v1.method.DEFAULT,
-                           timeout=google.api_core.gapic_v1.method.DEFAULT,
-                           metadata=None):
+    def create_quantum_job(
+            self,
+            parent: Optional[str] = None,
+            quantum_job: Union[Dict[str, Any], pb_types.QuantumJob] = None,
+            overwrite_existing_run_context: Optional[bool] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -653,12 +677,14 @@ def create_quantum_job(self,
                                                            timeout=timeout,
                                                            metadata=metadata)
 
-    def get_quantum_job(self,
-                        name=None,
-                        return_run_context=None,
-                        retry=google.api_core.gapic_v1.method.DEFAULT,
-                        timeout=google.api_core.gapic_v1.method.DEFAULT,
-                        metadata=None):
+    def get_quantum_job(
+            self,
+            name: Optional[str] = None,
+            return_run_context: Optional[bool] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -723,13 +749,15 @@ def get_quantum_job(self,
                                                         timeout=timeout,
                                                         metadata=metadata)
 
-    def list_quantum_jobs(self,
-                          parent=None,
-                          page_size=None,
-                          filter_=None,
-                          retry=google.api_core.gapic_v1.method.DEFAULT,
-                          timeout=google.api_core.gapic_v1.method.DEFAULT,
-                          metadata=None):
+    def list_quantum_jobs(
+            self,
+            parent: Optional[str] = None,
+            page_size: Optional[int] = None,
+            filter_: Optional[str] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -823,11 +851,13 @@ def list_quantum_jobs(self,
         )
         return iterator
 
-    def delete_quantum_job(self,
-                           name=None,
-                           retry=google.api_core.gapic_v1.method.DEFAULT,
-                           timeout=google.api_core.gapic_v1.method.DEFAULT,
-                           metadata=None):
+    def delete_quantum_job(
+            self,
+            name: Optional[str] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -886,13 +916,15 @@ def delete_quantum_job(self,
                                                     timeout=timeout,
                                                     metadata=metadata)
 
-    def update_quantum_job(self,
-                           name=None,
-                           quantum_job=None,
-                           update_mask=None,
-                           retry=google.api_core.gapic_v1.method.DEFAULT,
-                           timeout=google.api_core.gapic_v1.method.DEFAULT,
-                           metadata=None):
+    def update_quantum_job(
+            self,
+            name: Optional[str] = None,
+            quantum_job: Union[Dict[str, Any], pb_types.QuantumJob] = None,
+            update_mask: Union[Dict[str, Any], field_mask_pb2.FieldMask] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -966,11 +998,13 @@ def update_quantum_job(self,
                                                            timeout=timeout,
                                                            metadata=metadata)
 
-    def cancel_quantum_job(self,
-                           name=None,
-                           retry=google.api_core.gapic_v1.method.DEFAULT,
-                           timeout=google.api_core.gapic_v1.method.DEFAULT,
-                           metadata=None):
+    def cancel_quantum_job(
+            self,
+            name: Optional[str] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -1029,12 +1063,14 @@ def cancel_quantum_job(self,
                                                     timeout=timeout,
                                                     metadata=metadata)
 
-    def list_quantum_job_events(self,
-                                parent=None,
-                                page_size=None,
-                                retry=google.api_core.gapic_v1.method.DEFAULT,
-                                timeout=google.api_core.gapic_v1.method.DEFAULT,
-                                metadata=None):
+    def list_quantum_job_events(
+            self,
+            parent: Optional[str] = None,
+            page_size: Optional[int] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -1128,11 +1164,13 @@ def list_quantum_job_events(self,
         )
         return iterator
 
-    def get_quantum_result(self,
-                           parent=None,
-                           retry=google.api_core.gapic_v1.method.DEFAULT,
-                           timeout=google.api_core.gapic_v1.method.DEFAULT,
-                           metadata=None):
+    def get_quantum_result(
+            self,
+            parent: Optional[str] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -1194,13 +1232,15 @@ def get_quantum_result(self,
                                                            timeout=timeout,
                                                            metadata=metadata)
 
-    def list_quantum_processors(self,
-                                parent=None,
-                                page_size=None,
-                                filter_=None,
-                                retry=google.api_core.gapic_v1.method.DEFAULT,
-                                timeout=google.api_core.gapic_v1.method.DEFAULT,
-                                metadata=None):
+    def list_quantum_processors(
+            self,
+            parent: Optional[str] = None,
+            page_size: Optional[int] = None,
+            filter_: Optional[str] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -1296,11 +1336,13 @@ def list_quantum_processors(self,
         )
         return iterator
 
-    def get_quantum_processor(self,
-                              name=None,
-                              retry=google.api_core.gapic_v1.method.DEFAULT,
-                              timeout=google.api_core.gapic_v1.method.DEFAULT,
-                              metadata=None):
+    def get_quantum_processor(
+            self,
+            name: Optional[str] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -1364,12 +1406,13 @@ def get_quantum_processor(self,
 
     def list_quantum_calibrations(
             self,
-            parent=None,
-            page_size=None,
-            filter_=None,
-            retry=google.api_core.gapic_v1.method.DEFAULT,
-            timeout=google.api_core.gapic_v1.method.DEFAULT,
-            metadata=None):
+            parent: Optional[str] = None,
+            page_size: Optional[int] = None,
+            filter_: Optional[str] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -1465,11 +1508,13 @@ def list_quantum_calibrations(
         )
         return iterator
 
-    def get_quantum_calibration(self,
-                                name=None,
-                                retry=google.api_core.gapic_v1.method.DEFAULT,
-                                timeout=google.api_core.gapic_v1.method.DEFAULT,
-                                metadata=None):
+    def get_quantum_calibration(
+            self,
+            name: Optional[str] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -1531,11 +1576,13 @@ def get_quantum_calibration(self,
 
     def create_quantum_reservation(
             self,
-            parent=None,
-            quantum_reservation=None,
-            retry=google.api_core.gapic_v1.method.DEFAULT,
-            timeout=google.api_core.gapic_v1.method.DEFAULT,
-            metadata=None):
+            parent: Optional[str] = None,
+            quantum_reservation: Union[Dict[str, Any], pb_types.
+                                       QuantumReservation] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -1604,10 +1651,11 @@ def create_quantum_reservation(
 
     def cancel_quantum_reservation(
             self,
-            name=None,
-            retry=google.api_core.gapic_v1.method.DEFAULT,
-            timeout=google.api_core.gapic_v1.method.DEFAULT,
-            metadata=None):
+            name: Optional[str] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -1669,10 +1717,11 @@ def cancel_quantum_reservation(
 
     def delete_quantum_reservation(
             self,
-            name=None,
-            retry=google.api_core.gapic_v1.method.DEFAULT,
-            timeout=google.api_core.gapic_v1.method.DEFAULT,
-            metadata=None):
+            name: Optional[str] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -1731,11 +1780,13 @@ def delete_quantum_reservation(
                                                             timeout=timeout,
                                                             metadata=metadata)
 
-    def get_quantum_reservation(self,
-                                name=None,
-                                retry=google.api_core.gapic_v1.method.DEFAULT,
-                                timeout=google.api_core.gapic_v1.method.DEFAULT,
-                                metadata=None):
+    def get_quantum_reservation(
+            self,
+            name: Optional[str] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -1797,12 +1848,13 @@ def get_quantum_reservation(self,
 
     def list_quantum_reservations(
             self,
-            parent=None,
-            page_size=None,
-            filter_=None,
-            retry=google.api_core.gapic_v1.method.DEFAULT,
-            timeout=google.api_core.gapic_v1.method.DEFAULT,
-            metadata=None):
+            parent: Optional[str] = None,
+            page_size: Optional[int] = None,
+            filter_: Optional[str] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -1900,12 +1952,14 @@ def list_quantum_reservations(
 
     def update_quantum_reservation(
             self,
-            name=None,
-            quantum_reservation=None,
-            update_mask=None,
-            retry=google.api_core.gapic_v1.method.DEFAULT,
-            timeout=google.api_core.gapic_v1.method.DEFAULT,
-            metadata=None):
+            name: Optional[str] = None,
+            quantum_reservation: Union[Dict[str, Any], pb_types.
+                                       QuantumReservation] = None,
+            update_mask: Union[Dict[str, Any], field_mask_pb2.FieldMask] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -1977,11 +2031,13 @@ def update_quantum_reservation(
         return self._inner_api_calls['update_quantum_reservation'](
             request, retry=retry, timeout=timeout, metadata=metadata)
 
-    def quantum_run_stream(self,
-                           requests,
-                           retry=google.api_core.gapic_v1.method.DEFAULT,
-                           timeout=google.api_core.gapic_v1.method.DEFAULT,
-                           metadata=None):
+    def quantum_run_stream(
+            self,
+            requests,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -2038,12 +2094,13 @@ def quantum_run_stream(self,
 
     def list_quantum_reservation_grants(
             self,
-            parent=None,
-            page_size=None,
-            filter_=None,
-            retry=google.api_core.gapic_v1.method.DEFAULT,
-            timeout=google.api_core.gapic_v1.method.DEFAULT,
-            metadata=None):
+            parent: Optional[str] = None,
+            page_size: Optional[int] = None,
+            filter_: Optional[str] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -2141,13 +2198,14 @@ def list_quantum_reservation_grants(
 
     def reallocate_quantum_reservation_grant(
             self,
-            name=None,
-            source_project_id=None,
-            target_project_id=None,
-            duration=None,
-            retry=google.api_core.gapic_v1.method.DEFAULT,
-            timeout=google.api_core.gapic_v1.method.DEFAULT,
-            metadata=None):
+            name: Optional[str] = None,
+            source_project_id: Optional[str] = None,
+            target_project_id: Optional[str] = None,
+            duration: Union[Dict[str, Any], duration_pb2.Duration] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -2220,12 +2278,13 @@ def reallocate_quantum_reservation_grant(
 
     def list_quantum_reservation_budgets(
             self,
-            parent=None,
-            page_size=None,
-            filter_=None,
-            retry=google.api_core.gapic_v1.method.DEFAULT,
-            timeout=google.api_core.gapic_v1.method.DEFAULT,
-            metadata=None):
+            parent: Optional[str] = None,
+            page_size: Optional[int] = None,
+            filter_: Optional[str] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 
@@ -2321,13 +2380,15 @@ def list_quantum_reservation_budgets(
         )
         return iterator
 
-    def list_quantum_time_slots(self,
-                                parent=None,
-                                page_size=None,
-                                filter_=None,
-                                retry=google.api_core.gapic_v1.method.DEFAULT,
-                                timeout=google.api_core.gapic_v1.method.DEFAULT,
-                                metadata=None):
+    def list_quantum_time_slots(
+            self,
+            parent: Optional[str] = None,
+            page_size: Optional[int] = None,
+            filter_: Optional[str] = None,
+            retry: Optional[google.api_core.retry.
+                            Retry] = google.api_core.gapic_v1.method.DEFAULT,
+            timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
+            metadata: Optional[Sequence[Tuple[str, str]]] = None):
         """
         -
 


Test patch: