From bc0e3c0b61f2c73eda1961a35f6d34b06efa27b1 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Fri, 13 Feb 2026 19:24:44 +0000 Subject: [PATCH] feat: update image to us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:a38add811f7f139d6a385b22d283ad09ef305b8cf50382ef62f0ce690787f021 --- .librarian/state.yaml | 2 +- .../config_service_v2/async_client.py | 20 ++++++++++++------- .../services/config_service_v2/client.py | 10 +++++----- .../config_service_v2/transports/base.py | 2 +- .../config_service_v2/transports/grpc.py | 2 +- .../transports/grpc_asyncio.py | 2 +- .../logging_service_v2/async_client.py | 12 ++++++++--- .../services/logging_service_v2/client.py | 2 +- .../services/logging_service_v2/pagers.py | 2 +- .../logging_service_v2/transports/base.py | 2 +- .../logging_service_v2/transports/grpc.py | 2 +- .../transports/grpc_asyncio.py | 2 +- .../metrics_service_v2/async_client.py | 16 ++++++++++----- .../services/metrics_service_v2/client.py | 6 +++--- .../metrics_service_v2/transports/base.py | 2 +- .../metrics_service_v2/transports/grpc.py | 2 +- .../transports/grpc_asyncio.py | 2 +- google/cloud/logging_v2/types/log_entry.py | 12 +++++------ google/cloud/logging_v2/types/logging.py | 6 +++--- .../cloud/logging_v2/types/logging_config.py | 4 ++-- .../cloud/logging_v2/types/logging_metrics.py | 6 +++--- mypy.ini | 12 +++++++++++ .../logging_v2/test_config_service_v2.py | 9 +++++---- .../logging_v2/test_logging_service_v2.py | 15 +++++++------- .../logging_v2/test_metrics_service_v2.py | 13 ++++++------ 25 files changed, 99 insertions(+), 66 deletions(-) diff --git a/.librarian/state.yaml b/.librarian/state.yaml index 5ce6be53..90303679 100644 --- a/.librarian/state.yaml +++ b/.librarian/state.yaml @@ -1,4 +1,4 @@ -image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:e7cc6823efb073a8a26e7cefdd869f12ec228abfbd2a44aa9a7eacc284023677 +image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:a38add811f7f139d6a385b22d283ad09ef305b8cf50382ef62f0ce690787f021 libraries: - id: google-cloud-logging version: 3.13.0 diff --git a/google/cloud/logging_v2/services/config_service_v2/async_client.py b/google/cloud/logging_v2/services/config_service_v2/async_client.py index 1ecc5954..f94282b6 100644 --- a/google/cloud/logging_v2/services/config_service_v2/async_client.py +++ b/google/cloud/logging_v2/services/config_service_v2/async_client.py @@ -46,14 +46,14 @@ except AttributeError: # pragma: NO COVER OptionalRetry = Union[retries.AsyncRetry, object, None] # type: ignore -from google.api_core import operation # type: ignore -from google.api_core import operation_async # type: ignore from google.cloud.logging_v2.services.config_service_v2 import pagers from google.cloud.logging_v2.types import logging_config from google.longrunning import operations_pb2 # type: ignore -from google.protobuf import empty_pb2 # type: ignore -from google.protobuf import field_mask_pb2 # type: ignore -from google.protobuf import timestamp_pb2 # type: ignore +import google.api_core.operation as operation # type: ignore +import google.api_core.operation_async as operation_async # type: ignore +import google.protobuf.empty_pb2 as empty_pb2 # type: ignore +import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore from .transports.base import ConfigServiceV2Transport, DEFAULT_CLIENT_INFO from .transports.grpc_asyncio import ConfigServiceV2GrpcAsyncIOTransport from .client import ConfigServiceV2Client @@ -136,7 +136,10 @@ def from_service_account_info(cls, info: dict, *args, **kwargs): Returns: ConfigServiceV2AsyncClient: The constructed client. """ - return ConfigServiceV2Client.from_service_account_info.__func__(ConfigServiceV2AsyncClient, info, *args, **kwargs) # type: ignore + sa_info_func = ( + ConfigServiceV2Client.from_service_account_info.__func__ # type: ignore + ) + return sa_info_func(ConfigServiceV2AsyncClient, info, *args, **kwargs) @classmethod def from_service_account_file(cls, filename: str, *args, **kwargs): @@ -152,7 +155,10 @@ def from_service_account_file(cls, filename: str, *args, **kwargs): Returns: ConfigServiceV2AsyncClient: The constructed client. """ - return ConfigServiceV2Client.from_service_account_file.__func__(ConfigServiceV2AsyncClient, filename, *args, **kwargs) # type: ignore + sa_file_func = ( + ConfigServiceV2Client.from_service_account_file.__func__ # type: ignore + ) + return sa_file_func(ConfigServiceV2AsyncClient, filename, *args, **kwargs) from_service_account_json = from_service_account_file diff --git a/google/cloud/logging_v2/services/config_service_v2/client.py b/google/cloud/logging_v2/services/config_service_v2/client.py index 27d0ab6e..5b150329 100644 --- a/google/cloud/logging_v2/services/config_service_v2/client.py +++ b/google/cloud/logging_v2/services/config_service_v2/client.py @@ -62,14 +62,14 @@ _LOGGER = std_logging.getLogger(__name__) -from google.api_core import operation # type: ignore -from google.api_core import operation_async # type: ignore from google.cloud.logging_v2.services.config_service_v2 import pagers from google.cloud.logging_v2.types import logging_config from google.longrunning import operations_pb2 # type: ignore -from google.protobuf import empty_pb2 # type: ignore -from google.protobuf import field_mask_pb2 # type: ignore -from google.protobuf import timestamp_pb2 # type: ignore +import google.api_core.operation as operation # type: ignore +import google.api_core.operation_async as operation_async # type: ignore +import google.protobuf.empty_pb2 as empty_pb2 # type: ignore +import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore from .transports.base import ConfigServiceV2Transport, DEFAULT_CLIENT_INFO from .transports.grpc import ConfigServiceV2GrpcTransport from .transports.grpc_asyncio import ConfigServiceV2GrpcAsyncIOTransport diff --git a/google/cloud/logging_v2/services/config_service_v2/transports/base.py b/google/cloud/logging_v2/services/config_service_v2/transports/base.py index c0d1b0a9..b7023872 100644 --- a/google/cloud/logging_v2/services/config_service_v2/transports/base.py +++ b/google/cloud/logging_v2/services/config_service_v2/transports/base.py @@ -30,7 +30,7 @@ from google.cloud.logging_v2.types import logging_config from google.longrunning import operations_pb2 # type: ignore -from google.protobuf import empty_pb2 # type: ignore +import google.protobuf.empty_pb2 as empty_pb2 # type: ignore DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ diff --git a/google/cloud/logging_v2/services/config_service_v2/transports/grpc.py b/google/cloud/logging_v2/services/config_service_v2/transports/grpc.py index 4825151d..3f099dff 100644 --- a/google/cloud/logging_v2/services/config_service_v2/transports/grpc.py +++ b/google/cloud/logging_v2/services/config_service_v2/transports/grpc.py @@ -33,7 +33,7 @@ from google.cloud.logging_v2.types import logging_config from google.longrunning import operations_pb2 # type: ignore -from google.protobuf import empty_pb2 # type: ignore +import google.protobuf.empty_pb2 as empty_pb2 # type: ignore from .base import ConfigServiceV2Transport, DEFAULT_CLIENT_INFO try: diff --git a/google/cloud/logging_v2/services/config_service_v2/transports/grpc_asyncio.py b/google/cloud/logging_v2/services/config_service_v2/transports/grpc_asyncio.py index 4c5e9676..685c72e1 100644 --- a/google/cloud/logging_v2/services/config_service_v2/transports/grpc_asyncio.py +++ b/google/cloud/logging_v2/services/config_service_v2/transports/grpc_asyncio.py @@ -36,7 +36,7 @@ from google.cloud.logging_v2.types import logging_config from google.longrunning import operations_pb2 # type: ignore -from google.protobuf import empty_pb2 # type: ignore +import google.protobuf.empty_pb2 as empty_pb2 # type: ignore from .base import ConfigServiceV2Transport, DEFAULT_CLIENT_INFO from .grpc import ConfigServiceV2GrpcTransport diff --git a/google/cloud/logging_v2/services/logging_service_v2/async_client.py b/google/cloud/logging_v2/services/logging_service_v2/async_client.py index 89a290cf..615131ae 100644 --- a/google/cloud/logging_v2/services/logging_service_v2/async_client.py +++ b/google/cloud/logging_v2/services/logging_service_v2/async_client.py @@ -49,11 +49,11 @@ except AttributeError: # pragma: NO COVER OptionalRetry = Union[retries.AsyncRetry, object, None] # type: ignore -from google.api import monitored_resource_pb2 # type: ignore from google.cloud.logging_v2.services.logging_service_v2 import pagers from google.cloud.logging_v2.types import log_entry from google.cloud.logging_v2.types import logging from google.longrunning import operations_pb2 # type: ignore +import google.api.monitored_resource_pb2 as monitored_resource_pb2 # type: ignore from .transports.base import LoggingServiceV2Transport, DEFAULT_CLIENT_INFO from .transports.grpc_asyncio import LoggingServiceV2GrpcAsyncIOTransport from .client import LoggingServiceV2Client @@ -120,7 +120,10 @@ def from_service_account_info(cls, info: dict, *args, **kwargs): Returns: LoggingServiceV2AsyncClient: The constructed client. """ - return LoggingServiceV2Client.from_service_account_info.__func__(LoggingServiceV2AsyncClient, info, *args, **kwargs) # type: ignore + sa_info_func = ( + LoggingServiceV2Client.from_service_account_info.__func__ # type: ignore + ) + return sa_info_func(LoggingServiceV2AsyncClient, info, *args, **kwargs) @classmethod def from_service_account_file(cls, filename: str, *args, **kwargs): @@ -136,7 +139,10 @@ def from_service_account_file(cls, filename: str, *args, **kwargs): Returns: LoggingServiceV2AsyncClient: The constructed client. """ - return LoggingServiceV2Client.from_service_account_file.__func__(LoggingServiceV2AsyncClient, filename, *args, **kwargs) # type: ignore + sa_file_func = ( + LoggingServiceV2Client.from_service_account_file.__func__ # type: ignore + ) + return sa_file_func(LoggingServiceV2AsyncClient, filename, *args, **kwargs) from_service_account_json = from_service_account_file diff --git a/google/cloud/logging_v2/services/logging_service_v2/client.py b/google/cloud/logging_v2/services/logging_service_v2/client.py index 3ebcd76f..bfbe9d01 100644 --- a/google/cloud/logging_v2/services/logging_service_v2/client.py +++ b/google/cloud/logging_v2/services/logging_service_v2/client.py @@ -64,11 +64,11 @@ _LOGGER = std_logging.getLogger(__name__) -from google.api import monitored_resource_pb2 # type: ignore from google.cloud.logging_v2.services.logging_service_v2 import pagers from google.cloud.logging_v2.types import log_entry from google.cloud.logging_v2.types import logging from google.longrunning import operations_pb2 # type: ignore +import google.api.monitored_resource_pb2 as monitored_resource_pb2 # type: ignore from .transports.base import LoggingServiceV2Transport, DEFAULT_CLIENT_INFO from .transports.grpc import LoggingServiceV2GrpcTransport from .transports.grpc_asyncio import LoggingServiceV2GrpcAsyncIOTransport diff --git a/google/cloud/logging_v2/services/logging_service_v2/pagers.py b/google/cloud/logging_v2/services/logging_service_v2/pagers.py index f19ad630..81a8ba2d 100644 --- a/google/cloud/logging_v2/services/logging_service_v2/pagers.py +++ b/google/cloud/logging_v2/services/logging_service_v2/pagers.py @@ -37,9 +37,9 @@ OptionalRetry = Union[retries.Retry, object, None] # type: ignore OptionalAsyncRetry = Union[retries_async.AsyncRetry, object, None] # type: ignore -from google.api import monitored_resource_pb2 # type: ignore from google.cloud.logging_v2.types import log_entry from google.cloud.logging_v2.types import logging +import google.api.monitored_resource_pb2 as monitored_resource_pb2 # type: ignore class ListLogEntriesPager: diff --git a/google/cloud/logging_v2/services/logging_service_v2/transports/base.py b/google/cloud/logging_v2/services/logging_service_v2/transports/base.py index 39bf318f..07d21053 100644 --- a/google/cloud/logging_v2/services/logging_service_v2/transports/base.py +++ b/google/cloud/logging_v2/services/logging_service_v2/transports/base.py @@ -29,7 +29,7 @@ from google.cloud.logging_v2.types import logging from google.longrunning import operations_pb2 # type: ignore -from google.protobuf import empty_pb2 # type: ignore +import google.protobuf.empty_pb2 as empty_pb2 # type: ignore DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ diff --git a/google/cloud/logging_v2/services/logging_service_v2/transports/grpc.py b/google/cloud/logging_v2/services/logging_service_v2/transports/grpc.py index 8ed0e80d..5ee7fba7 100644 --- a/google/cloud/logging_v2/services/logging_service_v2/transports/grpc.py +++ b/google/cloud/logging_v2/services/logging_service_v2/transports/grpc.py @@ -32,7 +32,7 @@ from google.cloud.logging_v2.types import logging from google.longrunning import operations_pb2 # type: ignore -from google.protobuf import empty_pb2 # type: ignore +import google.protobuf.empty_pb2 as empty_pb2 # type: ignore from .base import LoggingServiceV2Transport, DEFAULT_CLIENT_INFO try: diff --git a/google/cloud/logging_v2/services/logging_service_v2/transports/grpc_asyncio.py b/google/cloud/logging_v2/services/logging_service_v2/transports/grpc_asyncio.py index 46fbec20..8996b6ca 100644 --- a/google/cloud/logging_v2/services/logging_service_v2/transports/grpc_asyncio.py +++ b/google/cloud/logging_v2/services/logging_service_v2/transports/grpc_asyncio.py @@ -35,7 +35,7 @@ from google.cloud.logging_v2.types import logging from google.longrunning import operations_pb2 # type: ignore -from google.protobuf import empty_pb2 # type: ignore +import google.protobuf.empty_pb2 as empty_pb2 # type: ignore from .base import LoggingServiceV2Transport, DEFAULT_CLIENT_INFO from .grpc import LoggingServiceV2GrpcTransport diff --git a/google/cloud/logging_v2/services/metrics_service_v2/async_client.py b/google/cloud/logging_v2/services/metrics_service_v2/async_client.py index 7ca6059a..cf137916 100644 --- a/google/cloud/logging_v2/services/metrics_service_v2/async_client.py +++ b/google/cloud/logging_v2/services/metrics_service_v2/async_client.py @@ -46,12 +46,12 @@ except AttributeError: # pragma: NO COVER OptionalRetry = Union[retries.AsyncRetry, object, None] # type: ignore -from google.api import distribution_pb2 # type: ignore -from google.api import metric_pb2 # type: ignore from google.cloud.logging_v2.services.metrics_service_v2 import pagers from google.cloud.logging_v2.types import logging_metrics from google.longrunning import operations_pb2 # type: ignore -from google.protobuf import timestamp_pb2 # type: ignore +import google.api.distribution_pb2 as distribution_pb2 # type: ignore +import google.api.metric_pb2 as metric_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore from .transports.base import MetricsServiceV2Transport, DEFAULT_CLIENT_INFO from .transports.grpc_asyncio import MetricsServiceV2GrpcAsyncIOTransport from .client import MetricsServiceV2Client @@ -118,7 +118,10 @@ def from_service_account_info(cls, info: dict, *args, **kwargs): Returns: MetricsServiceV2AsyncClient: The constructed client. """ - return MetricsServiceV2Client.from_service_account_info.__func__(MetricsServiceV2AsyncClient, info, *args, **kwargs) # type: ignore + sa_info_func = ( + MetricsServiceV2Client.from_service_account_info.__func__ # type: ignore + ) + return sa_info_func(MetricsServiceV2AsyncClient, info, *args, **kwargs) @classmethod def from_service_account_file(cls, filename: str, *args, **kwargs): @@ -134,7 +137,10 @@ def from_service_account_file(cls, filename: str, *args, **kwargs): Returns: MetricsServiceV2AsyncClient: The constructed client. """ - return MetricsServiceV2Client.from_service_account_file.__func__(MetricsServiceV2AsyncClient, filename, *args, **kwargs) # type: ignore + sa_file_func = ( + MetricsServiceV2Client.from_service_account_file.__func__ # type: ignore + ) + return sa_file_func(MetricsServiceV2AsyncClient, filename, *args, **kwargs) from_service_account_json = from_service_account_file diff --git a/google/cloud/logging_v2/services/metrics_service_v2/client.py b/google/cloud/logging_v2/services/metrics_service_v2/client.py index 787156eb..0376f069 100644 --- a/google/cloud/logging_v2/services/metrics_service_v2/client.py +++ b/google/cloud/logging_v2/services/metrics_service_v2/client.py @@ -62,12 +62,12 @@ _LOGGER = std_logging.getLogger(__name__) -from google.api import distribution_pb2 # type: ignore -from google.api import metric_pb2 # type: ignore from google.cloud.logging_v2.services.metrics_service_v2 import pagers from google.cloud.logging_v2.types import logging_metrics from google.longrunning import operations_pb2 # type: ignore -from google.protobuf import timestamp_pb2 # type: ignore +import google.api.distribution_pb2 as distribution_pb2 # type: ignore +import google.api.metric_pb2 as metric_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore from .transports.base import MetricsServiceV2Transport, DEFAULT_CLIENT_INFO from .transports.grpc import MetricsServiceV2GrpcTransport from .transports.grpc_asyncio import MetricsServiceV2GrpcAsyncIOTransport diff --git a/google/cloud/logging_v2/services/metrics_service_v2/transports/base.py b/google/cloud/logging_v2/services/metrics_service_v2/transports/base.py index c8c0f539..67589e1e 100644 --- a/google/cloud/logging_v2/services/metrics_service_v2/transports/base.py +++ b/google/cloud/logging_v2/services/metrics_service_v2/transports/base.py @@ -29,7 +29,7 @@ from google.cloud.logging_v2.types import logging_metrics from google.longrunning import operations_pb2 # type: ignore -from google.protobuf import empty_pb2 # type: ignore +import google.protobuf.empty_pb2 as empty_pb2 # type: ignore DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ diff --git a/google/cloud/logging_v2/services/metrics_service_v2/transports/grpc.py b/google/cloud/logging_v2/services/metrics_service_v2/transports/grpc.py index d5ca8fd0..802cddd7 100644 --- a/google/cloud/logging_v2/services/metrics_service_v2/transports/grpc.py +++ b/google/cloud/logging_v2/services/metrics_service_v2/transports/grpc.py @@ -32,7 +32,7 @@ from google.cloud.logging_v2.types import logging_metrics from google.longrunning import operations_pb2 # type: ignore -from google.protobuf import empty_pb2 # type: ignore +import google.protobuf.empty_pb2 as empty_pb2 # type: ignore from .base import MetricsServiceV2Transport, DEFAULT_CLIENT_INFO try: diff --git a/google/cloud/logging_v2/services/metrics_service_v2/transports/grpc_asyncio.py b/google/cloud/logging_v2/services/metrics_service_v2/transports/grpc_asyncio.py index 5134c4c8..841598a5 100644 --- a/google/cloud/logging_v2/services/metrics_service_v2/transports/grpc_asyncio.py +++ b/google/cloud/logging_v2/services/metrics_service_v2/transports/grpc_asyncio.py @@ -35,7 +35,7 @@ from google.cloud.logging_v2.types import logging_metrics from google.longrunning import operations_pb2 # type: ignore -from google.protobuf import empty_pb2 # type: ignore +import google.protobuf.empty_pb2 as empty_pb2 # type: ignore from .base import MetricsServiceV2Transport, DEFAULT_CLIENT_INFO from .grpc import MetricsServiceV2GrpcTransport diff --git a/google/cloud/logging_v2/types/log_entry.py b/google/cloud/logging_v2/types/log_entry.py index 38ec6e18..a4374139 100644 --- a/google/cloud/logging_v2/types/log_entry.py +++ b/google/cloud/logging_v2/types/log_entry.py @@ -19,12 +19,12 @@ import proto # type: ignore -from google.api import monitored_resource_pb2 # type: ignore -from google.logging.type import http_request_pb2 # type: ignore -from google.logging.type import log_severity_pb2 # type: ignore -from google.protobuf import any_pb2 # type: ignore -from google.protobuf import struct_pb2 # type: ignore -from google.protobuf import timestamp_pb2 # type: ignore +import google.api.monitored_resource_pb2 as monitored_resource_pb2 # type: ignore +import google.logging.type.http_request_pb2 as http_request_pb2 # type: ignore +import google.logging.type.log_severity_pb2 as log_severity_pb2 # type: ignore +import google.protobuf.any_pb2 as any_pb2 # type: ignore +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore __protobuf__ = proto.module( diff --git a/google/cloud/logging_v2/types/logging.py b/google/cloud/logging_v2/types/logging.py index e06819a3..34f954d6 100644 --- a/google/cloud/logging_v2/types/logging.py +++ b/google/cloud/logging_v2/types/logging.py @@ -19,10 +19,10 @@ import proto # type: ignore -from google.api import monitored_resource_pb2 # type: ignore from google.cloud.logging_v2.types import log_entry -from google.protobuf import duration_pb2 # type: ignore -from google.rpc import status_pb2 # type: ignore +import google.api.monitored_resource_pb2 as monitored_resource_pb2 # type: ignore +import google.protobuf.duration_pb2 as duration_pb2 # type: ignore +import google.rpc.status_pb2 as status_pb2 # type: ignore __protobuf__ = proto.module( diff --git a/google/cloud/logging_v2/types/logging_config.py b/google/cloud/logging_v2/types/logging_config.py index bfaec563..fb4bfeeb 100644 --- a/google/cloud/logging_v2/types/logging_config.py +++ b/google/cloud/logging_v2/types/logging_config.py @@ -19,8 +19,8 @@ import proto # type: ignore -from google.protobuf import field_mask_pb2 # type: ignore -from google.protobuf import timestamp_pb2 # type: ignore +import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore __protobuf__ = proto.module( diff --git a/google/cloud/logging_v2/types/logging_metrics.py b/google/cloud/logging_v2/types/logging_metrics.py index dd90dd3c..e7dd09be 100644 --- a/google/cloud/logging_v2/types/logging_metrics.py +++ b/google/cloud/logging_v2/types/logging_metrics.py @@ -19,9 +19,9 @@ import proto # type: ignore -from google.api import distribution_pb2 # type: ignore -from google.api import metric_pb2 # type: ignore -from google.protobuf import timestamp_pb2 # type: ignore +import google.api.distribution_pb2 as distribution_pb2 # type: ignore +import google.api.metric_pb2 as metric_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore __protobuf__ = proto.module( diff --git a/mypy.ini b/mypy.ini index a3cb5c29..e0e0da2e 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,3 +1,15 @@ [mypy] python_version = 3.14 namespace_packages = True +ignore_missing_imports = False + +# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563): +# Dependencies that historically lacks py.typed markers +[mypy-google.iam.*] +ignore_missing_imports = True + +# Helps mypy navigate the 'google' namespace more reliably in 3.10+ +explicit_package_bases = True + +# Performance: reuse results from previous runs to speed up 'nox' +incremental = True diff --git a/tests/unit/gapic/logging_v2/test_config_service_v2.py b/tests/unit/gapic/logging_v2/test_config_service_v2.py index 3fe36327..6c42eefa 100644 --- a/tests/unit/gapic/logging_v2/test_config_service_v2.py +++ b/tests/unit/gapic/logging_v2/test_config_service_v2.py @@ -28,6 +28,7 @@ import json import math import pytest +from collections.abc import Sequence, Mapping from google.api_core import api_core_version from proto.marshal.rules.dates import DurationRule, TimestampRule from proto.marshal.rules import wrappers @@ -46,7 +47,6 @@ from google.api_core import grpc_helpers from google.api_core import grpc_helpers_async from google.api_core import operation -from google.api_core import operation_async # type: ignore from google.api_core import operations_v1 from google.api_core import path_template from google.api_core import retry as retries @@ -61,10 +61,11 @@ from google.cloud.logging_v2.types import logging_config from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account -from google.protobuf import empty_pb2 # type: ignore -from google.protobuf import field_mask_pb2 # type: ignore -from google.protobuf import timestamp_pb2 # type: ignore +import google.api_core.operation_async as operation_async # type: ignore import google.auth +import google.protobuf.empty_pb2 as empty_pb2 # type: ignore +import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore CRED_INFO_JSON = { diff --git a/tests/unit/gapic/logging_v2/test_logging_service_v2.py b/tests/unit/gapic/logging_v2/test_logging_service_v2.py index 60ea1b21..5dd0b2c9 100644 --- a/tests/unit/gapic/logging_v2/test_logging_service_v2.py +++ b/tests/unit/gapic/logging_v2/test_logging_service_v2.py @@ -28,6 +28,7 @@ import json import math import pytest +from collections.abc import Sequence, Mapping from google.api_core import api_core_version from proto.marshal.rules.dates import DurationRule, TimestampRule from proto.marshal.rules import wrappers @@ -39,7 +40,6 @@ except ImportError: # pragma: NO COVER HAS_GOOGLE_AUTH_AIO = False -from google.api import monitored_resource_pb2 # type: ignore from google.api_core import client_options from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 @@ -57,15 +57,16 @@ from google.cloud.logging_v2.services.logging_service_v2 import transports from google.cloud.logging_v2.types import log_entry from google.cloud.logging_v2.types import logging -from google.logging.type import http_request_pb2 # type: ignore -from google.logging.type import log_severity_pb2 # type: ignore from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account -from google.protobuf import any_pb2 # type: ignore -from google.protobuf import duration_pb2 # type: ignore -from google.protobuf import struct_pb2 # type: ignore -from google.protobuf import timestamp_pb2 # type: ignore +import google.api.monitored_resource_pb2 as monitored_resource_pb2 # type: ignore import google.auth +import google.logging.type.http_request_pb2 as http_request_pb2 # type: ignore +import google.logging.type.log_severity_pb2 as log_severity_pb2 # type: ignore +import google.protobuf.any_pb2 as any_pb2 # type: ignore +import google.protobuf.duration_pb2 as duration_pb2 # type: ignore +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore CRED_INFO_JSON = { diff --git a/tests/unit/gapic/logging_v2/test_metrics_service_v2.py b/tests/unit/gapic/logging_v2/test_metrics_service_v2.py index 2416e290..a313d73d 100644 --- a/tests/unit/gapic/logging_v2/test_metrics_service_v2.py +++ b/tests/unit/gapic/logging_v2/test_metrics_service_v2.py @@ -28,6 +28,7 @@ import json import math import pytest +from collections.abc import Sequence, Mapping from google.api_core import api_core_version from proto.marshal.rules.dates import DurationRule, TimestampRule from proto.marshal.rules import wrappers @@ -39,10 +40,6 @@ except ImportError: # pragma: NO COVER HAS_GOOGLE_AUTH_AIO = False -from google.api import distribution_pb2 # type: ignore -from google.api import label_pb2 # type: ignore -from google.api import launch_stage_pb2 # type: ignore -from google.api import metric_pb2 # type: ignore from google.api_core import client_options from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 @@ -61,9 +58,13 @@ from google.cloud.logging_v2.types import logging_metrics from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account -from google.protobuf import duration_pb2 # type: ignore -from google.protobuf import timestamp_pb2 # type: ignore +import google.api.distribution_pb2 as distribution_pb2 # type: ignore +import google.api.label_pb2 as label_pb2 # type: ignore +import google.api.launch_stage_pb2 as launch_stage_pb2 # type: ignore +import google.api.metric_pb2 as metric_pb2 # type: ignore import google.auth +import google.protobuf.duration_pb2 as duration_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore CRED_INFO_JSON = {