diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index f5d93d6fe2..775861986c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -313,11 +313,11 @@ jobs: python -m pip install nox - name: Run blacken and lint on the generated output. run: | - nox -f tests/integration/goldens/asset/noxfile.py -s blacken lint_setup_py lint - nox -f tests/integration/goldens/credentials/noxfile.py -s blacken lint_setup_py lint - nox -f tests/integration/goldens/eventarc/noxfile.py -s blacken lint_setup_py lint - nox -f tests/integration/goldens/logging/noxfile.py -s blacken lint_setup_py lint - nox -f tests/integration/goldens/redis/noxfile.py -s blacken lint_setup_py lint + nox -f tests/integration/goldens/asset/noxfile.py -s mypy-3.11 blacken lint_setup_py lint + nox -f tests/integration/goldens/credentials/noxfile.py -s mypy-3.11 blacken lint_setup_py lint + nox -f tests/integration/goldens/eventarc/noxfile.py -s mypy-3.11 blacken lint_setup_py lint + nox -f tests/integration/goldens/logging/noxfile.py -s mypy-3.11 blacken lint_setup_py lint + nox -f tests/integration/goldens/redis/noxfile.py -s mypy-3.11 blacken lint_setup_py lint style-check: runs-on: ubuntu-latest steps: diff --git a/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/rest.py.j2 b/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/rest.py.j2 index bf8946c529..5c2d102f48 100644 --- a/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/rest.py.j2 +++ b/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/rest.py.j2 @@ -22,7 +22,7 @@ from google.api_core import operations_v1 from requests import __version__ as requests_version import dataclasses import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union import warnings try: @@ -269,7 +269,7 @@ class {{service.name}}RestTransport({{service.name}}Transport): {% if not method.client_streaming %} {% if method.input.required_fields %} - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { {% for req_field in method.input.required_fields if req_field.name in method.query_params %} "{{ req_field.name | camel_case }}" : {% if req_field.field_pb.type == 9 %}"{{req_field.field_pb.default_value }}"{% elif req_field.field_pb.type in [11, 14] %}{}{% else %}{{ req_field.type.python_type(req_field.field_pb.default_value or 0) }}{% endif %},{# default is str #} {% endfor %} diff --git a/gapic/ads-templates/%namespace/%name/%version/%sub/types/%proto.py.j2 b/gapic/ads-templates/%namespace/%name/%version/%sub/types/%proto.py.j2 index 81a0755195..8418d42959 100644 --- a/gapic/ads-templates/%namespace/%name/%version/%sub/types/%proto.py.j2 +++ b/gapic/ads-templates/%namespace/%name/%version/%sub/types/%proto.py.j2 @@ -6,8 +6,8 @@ {% if proto.messages|length or proto.all_enums|length %} from typing import MutableMapping, MutableSequence -import proto{% if p != 'proto' %} as {{ p }}{% endif %} # type: ignore {% endif %} +import proto{% if p != 'proto' %} as {{ p }}{% endif %} # type: ignore {% filter sort_lines %} {% for import_ in proto.python_modules %} diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/rest.py.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/rest.py.j2 index 8d3661c0fc..7d8e72846e 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/rest.py.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/rest.py.j2 @@ -32,7 +32,7 @@ from google.longrunning import operations_pb2 from requests import __version__ as requests_version import dataclasses import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union import warnings try: @@ -299,7 +299,7 @@ class {{service.name}}RestTransport({{service.name}}Transport): {% if not method.client_streaming %} {% if method.input.required_fields %} - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { {% for req_field in method.input.required_fields if req_field.name in method.query_params %} "{{ req_field.name | camel_case }}" : {% if req_field.field_pb.type == 9 %}"{{req_field.field_pb.default_value }}"{% elif req_field.field_pb.type in [11, 14] %}{}{% else %}{{ req_field.type.python_type(req_field.field_pb.default_value or 0) }}{% endif %},{# default is str #} {% endfor %} diff --git a/gapic/templates/%namespace/%name_%version/%sub/types/%proto.py.j2 b/gapic/templates/%namespace/%name_%version/%sub/types/%proto.py.j2 index f5aebf7364..1d94e5a135 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/types/%proto.py.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/types/%proto.py.j2 @@ -6,8 +6,8 @@ {% if proto.messages|length or proto.all_enums|length %} from typing import MutableMapping, MutableSequence -import proto{% if p != 'proto' %} as {{ p }}{% endif %} # type: ignore {% endif %} +import proto{% if p != 'proto' %} as {{ p }}{% endif %} # type: ignore {% filter sort_lines %} {% for import_ in proto.python_modules %} diff --git a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/rest.py b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/rest.py index 529d6614a3..ef684a1424 100755 --- a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/rest.py +++ b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/rest.py @@ -31,7 +31,7 @@ from requests import __version__ as requests_version import dataclasses import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union import warnings try: @@ -481,7 +481,7 @@ class _AnalyzeIamPolicy(AssetServiceRestStub): def __hash__(self): return hash("AnalyzeIamPolicy") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { "analysisQuery" : {}, } @classmethod @@ -561,7 +561,7 @@ class _AnalyzeIamPolicyLongrunning(AssetServiceRestStub): def __hash__(self): return hash("AnalyzeIamPolicyLongrunning") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -650,7 +650,7 @@ class _BatchGetAssetsHistory(AssetServiceRestStub): def __hash__(self): return hash("BatchGetAssetsHistory") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -726,7 +726,7 @@ class _CreateFeed(AssetServiceRestStub): def __hash__(self): return hash("CreateFeed") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -818,7 +818,7 @@ class _DeleteFeed(AssetServiceRestStub): def __hash__(self): return hash("DeleteFeed") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -882,7 +882,7 @@ class _ExportAssets(AssetServiceRestStub): def __hash__(self): return hash("ExportAssets") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -968,7 +968,7 @@ class _GetFeed(AssetServiceRestStub): def __hash__(self): return hash("GetFeed") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -1051,7 +1051,7 @@ class _ListAssets(AssetServiceRestStub): def __hash__(self): return hash("ListAssets") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -1127,7 +1127,7 @@ class _ListFeeds(AssetServiceRestStub): def __hash__(self): return hash("ListFeeds") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -1203,7 +1203,7 @@ class _SearchAllIamPolicies(AssetServiceRestStub): def __hash__(self): return hash("SearchAllIamPolicies") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -1279,7 +1279,7 @@ class _SearchAllResources(AssetServiceRestStub): def __hash__(self): return hash("SearchAllResources") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -1355,7 +1355,7 @@ class _UpdateFeed(AssetServiceRestStub): def __hash__(self): return hash("UpdateFeed") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod diff --git a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/transports/rest.py b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/transports/rest.py index 6bb11e7d48..32eff78924 100755 --- a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/transports/rest.py +++ b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/transports/rest.py @@ -30,7 +30,7 @@ from requests import __version__ as requests_version import dataclasses import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union import warnings try: @@ -281,7 +281,7 @@ class _GenerateAccessToken(IAMCredentialsRestStub): def __hash__(self): return hash("GenerateAccessToken") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -366,7 +366,7 @@ class _GenerateIdToken(IAMCredentialsRestStub): def __hash__(self): return hash("GenerateIdToken") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -451,7 +451,7 @@ class _SignBlob(IAMCredentialsRestStub): def __hash__(self): return hash("SignBlob") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -536,7 +536,7 @@ class _SignJwt(IAMCredentialsRestStub): def __hash__(self): return hash("SignJwt") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod diff --git a/tests/integration/goldens/credentials/google/iam/credentials_v1/types/iamcredentials.py b/tests/integration/goldens/credentials/google/iam/credentials_v1/types/iamcredentials.py index 3cdecabdc9..ade7a6e16e 100755 --- a/tests/integration/goldens/credentials/google/iam/credentials_v1/types/iamcredentials.py +++ b/tests/integration/goldens/credentials/google/iam/credentials_v1/types/iamcredentials.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +import proto # type: ignore __protobuf__ = proto.module( diff --git a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/transports/rest.py b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/transports/rest.py index d107065ba7..956df80956 100755 --- a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/transports/rest.py +++ b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/transports/rest.py @@ -31,7 +31,7 @@ from requests import __version__ as requests_version import dataclasses import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union import warnings try: @@ -327,7 +327,7 @@ class _CreateTrigger(EventarcRestStub): def __hash__(self): return hash("CreateTrigger") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { "triggerId" : "", "validateOnly" : False, } @classmethod @@ -415,7 +415,7 @@ class _DeleteTrigger(EventarcRestStub): def __hash__(self): return hash("DeleteTrigger") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { "validateOnly" : False, } @classmethod @@ -494,7 +494,7 @@ class _GetTrigger(EventarcRestStub): def __hash__(self): return hash("GetTrigger") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -574,7 +574,7 @@ class _ListTriggers(EventarcRestStub): def __hash__(self): return hash("ListTriggers") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -654,7 +654,7 @@ class _UpdateTrigger(EventarcRestStub): def __hash__(self): return hash("UpdateTrigger") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { "validateOnly" : False, } @classmethod diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/rest.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/rest.py index d414a966e5..9fb4a17a30 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/rest.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/rest.py @@ -30,7 +30,7 @@ from requests import __version__ as requests_version import dataclasses import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union import warnings try: @@ -669,7 +669,7 @@ class _CreateBucket(ConfigServiceV2RestStub): def __hash__(self): return hash("CreateBucket") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { "bucketId" : "", } @classmethod @@ -774,7 +774,7 @@ class _CreateExclusion(ConfigServiceV2RestStub): def __hash__(self): return hash("CreateExclusion") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -890,7 +890,7 @@ class _CreateSink(ConfigServiceV2RestStub): def __hash__(self): return hash("CreateSink") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -1004,7 +1004,7 @@ class _CreateView(ConfigServiceV2RestStub): def __hash__(self): return hash("CreateView") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { "viewId" : "", } @classmethod @@ -1111,7 +1111,7 @@ class _DeleteBucket(ConfigServiceV2RestStub): def __hash__(self): return hash("DeleteBucket") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -1191,7 +1191,7 @@ class _DeleteExclusion(ConfigServiceV2RestStub): def __hash__(self): return hash("DeleteExclusion") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -1271,7 +1271,7 @@ class _DeleteSink(ConfigServiceV2RestStub): def __hash__(self): return hash("DeleteSink") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -1351,7 +1351,7 @@ class _DeleteView(ConfigServiceV2RestStub): def __hash__(self): return hash("DeleteView") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -1431,7 +1431,7 @@ class _GetBucket(ConfigServiceV2RestStub): def __hash__(self): return hash("GetBucket") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -1523,7 +1523,7 @@ class _GetCmekSettings(ConfigServiceV2RestStub): def __hash__(self): return hash("GetCmekSettings") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -1621,7 +1621,7 @@ class _GetExclusion(ConfigServiceV2RestStub): def __hash__(self): return hash("GetExclusion") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -1724,7 +1724,7 @@ class _GetSink(ConfigServiceV2RestStub): def __hash__(self): return hash("GetSink") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -1825,7 +1825,7 @@ class _GetView(ConfigServiceV2RestStub): def __hash__(self): return hash("GetView") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -1919,7 +1919,7 @@ class _ListBuckets(ConfigServiceV2RestStub): def __hash__(self): return hash("ListBuckets") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -2011,7 +2011,7 @@ class _ListExclusions(ConfigServiceV2RestStub): def __hash__(self): return hash("ListExclusions") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -2103,7 +2103,7 @@ class _ListSinks(ConfigServiceV2RestStub): def __hash__(self): return hash("ListSinks") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -2195,7 +2195,7 @@ class _ListViews(ConfigServiceV2RestStub): def __hash__(self): return hash("ListViews") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -2287,7 +2287,7 @@ class _UndeleteBucket(ConfigServiceV2RestStub): def __hash__(self): return hash("UndeleteBucket") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -2380,7 +2380,7 @@ class _UpdateBucket(ConfigServiceV2RestStub): def __hash__(self): return hash("UpdateBucket") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { "updateMask" : {}, } @classmethod @@ -2485,7 +2485,7 @@ class _UpdateCmekSettings(ConfigServiceV2RestStub): def __hash__(self): return hash("UpdateCmekSettings") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -2593,7 +2593,7 @@ class _UpdateExclusion(ConfigServiceV2RestStub): def __hash__(self): return hash("UpdateExclusion") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { "updateMask" : {}, } @classmethod @@ -2709,7 +2709,7 @@ class _UpdateSink(ConfigServiceV2RestStub): def __hash__(self): return hash("UpdateSink") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -2843,7 +2843,7 @@ class _UpdateView(ConfigServiceV2RestStub): def __hash__(self): return hash("UpdateView") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/transports/rest.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/transports/rest.py index 6dca3bcbb9..309e5179fc 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/transports/rest.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/transports/rest.py @@ -30,7 +30,7 @@ from requests import __version__ as requests_version import dataclasses import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union import warnings try: @@ -285,7 +285,7 @@ class _DeleteLog(LoggingServiceV2RestStub): def __hash__(self): return hash("DeleteLog") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -365,7 +365,7 @@ class _ListLogEntries(LoggingServiceV2RestStub): def __hash__(self): return hash("ListLogEntries") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -450,7 +450,7 @@ class _ListLogs(LoggingServiceV2RestStub): def __hash__(self): return hash("ListLogs") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -628,7 +628,7 @@ class _WriteLogEntries(LoggingServiceV2RestStub): def __hash__(self): return hash("WriteLogEntries") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/transports/rest.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/transports/rest.py index a7d2de532b..059ddf19d4 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/transports/rest.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/transports/rest.py @@ -30,7 +30,7 @@ from requests import __version__ as requests_version import dataclasses import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union import warnings try: @@ -285,7 +285,7 @@ class _CreateLogMetric(MetricsServiceV2RestStub): def __hash__(self): return hash("CreateLogMetric") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -381,7 +381,7 @@ class _DeleteLogMetric(MetricsServiceV2RestStub): def __hash__(self): return hash("DeleteLogMetric") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -445,7 +445,7 @@ class _GetLogMetric(MetricsServiceV2RestStub): def __hash__(self): return hash("GetLogMetric") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -532,7 +532,7 @@ class _ListLogMetrics(MetricsServiceV2RestStub): def __hash__(self): return hash("ListLogMetrics") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -608,7 +608,7 @@ class _UpdateLogMetric(MetricsServiceV2RestStub): def __hash__(self): return hash("UpdateLogMetric") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/rest.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/rest.py index c9bda09ab8..e27a5b5374 100755 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/rest.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/rest.py @@ -31,7 +31,7 @@ from requests import __version__ as requests_version import dataclasses import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union import warnings try: @@ -440,7 +440,7 @@ class _CreateInstance(CloudRedisRestStub): def __hash__(self): return hash("CreateInstance") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { "instanceId" : "", } @classmethod @@ -528,7 +528,7 @@ class _DeleteInstance(CloudRedisRestStub): def __hash__(self): return hash("DeleteInstance") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -607,7 +607,7 @@ class _ExportInstance(CloudRedisRestStub): def __hash__(self): return hash("ExportInstance") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -695,7 +695,7 @@ class _FailoverInstance(CloudRedisRestStub): def __hash__(self): return hash("FailoverInstance") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -783,7 +783,7 @@ class _GetInstance(CloudRedisRestStub): def __hash__(self): return hash("GetInstance") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -861,7 +861,7 @@ class _ImportInstance(CloudRedisRestStub): def __hash__(self): return hash("ImportInstance") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -949,7 +949,7 @@ class _ListInstances(CloudRedisRestStub): def __hash__(self): return hash("ListInstances") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod @@ -1029,7 +1029,7 @@ class _UpdateInstance(CloudRedisRestStub): def __hash__(self): return hash("UpdateInstance") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { "updateMask" : {}, } @classmethod @@ -1117,7 +1117,7 @@ class _UpgradeInstance(CloudRedisRestStub): def __hash__(self): return hash("UpgradeInstance") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { } @classmethod