Skip to content

Commit

Permalink
fix: Added type hints to CloudLoggingHandler constructor (#903)
Browse files Browse the repository at this point in the history
* fix: Added type hints to CloudLoggingHandler constructor

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* Removed Client typing due to circular imports

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gkevinzheng and gcf-owl-bot[bot] committed Jun 10, 2024
1 parent a49f78c commit 6959345
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions google/cloud/logging_v2/handlers/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,19 @@
import json
import logging

from google.cloud.logging_v2.handlers.transports import BackgroundThreadTransport
from typing import Optional, IO

from google.cloud.logging_v2.handlers.transports import (
BackgroundThreadTransport,
Transport,
)
from google.cloud.logging_v2.handlers._monitored_resources import (
detect_resource,
add_resource_labels,
)
from google.cloud.logging_v2.handlers._helpers import get_request_data
from google.cloud.logging_v2.resource import Resource


DEFAULT_LOGGER_NAME = "python"

Expand Down Expand Up @@ -149,11 +156,11 @@ def __init__(
self,
client,
*,
name=DEFAULT_LOGGER_NAME,
transport=BackgroundThreadTransport,
resource=None,
labels=None,
stream=None,
name: str = DEFAULT_LOGGER_NAME,
transport: Transport = BackgroundThreadTransport,
resource: Resource = None,
labels: Optional[dict] = None,
stream: Optional[IO] = None,
**kwargs,
):
"""
Expand Down

0 comments on commit 6959345

Please sign in to comment.