Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .librarian/state.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand All @@ -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

Expand Down
10 changes: 5 additions & 5 deletions google/cloud/logging_v2/services/config_service_v2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 6 additions & 6 deletions google/cloud/logging_v2/types/log_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions google/cloud/logging_v2/types/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/logging_v2/types/logging_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions google/cloud/logging_v2/types/logging_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
12 changes: 12 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -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
9 changes: 5 additions & 4 deletions tests/unit/gapic/logging_v2/test_config_service_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 = {
Expand Down
Loading