Skip to content

Commit

Permalink
fix: Fixed type hinting issue with specifying Transport class (#930)
Browse files Browse the repository at this point in the history
* Fixed type hinting issue with specifying Transport class

* Switching to typing.Type for compatibility with older Python versions
  • Loading branch information
gkevinzheng authored Aug 7, 2024
1 parent 5fcdbb6 commit e2875d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions google/cloud/logging_v2/handlers/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import json
import logging

from typing import Optional, IO
from typing import Optional, IO, Type

from google.cloud.logging_v2.handlers.transports import (
BackgroundThreadTransport,
Expand Down Expand Up @@ -157,7 +157,7 @@ def __init__(
client,
*,
name: str = DEFAULT_LOGGER_NAME,
transport: Transport = BackgroundThreadTransport,
transport: Type[Transport] = BackgroundThreadTransport,
resource: Resource = None,
labels: Optional[dict] = None,
stream: Optional[IO] = None,
Expand Down

0 comments on commit e2875d6

Please sign in to comment.