You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2026. It is now read-only.
VSCode's Python plugin can't understand the type of transport argument for CloudLoggingHandler's constructor. It expects to see BackgroundThreadTransport class instead of base.Transport.
So a call with SyncTransport is reported as an error:
import google.cloud.logging
from google.cloud.logging.handlers import CloudLoggingHandler, setup_logging
from google.cloud.logging.handlers.transports import SyncTransport
client = google.cloud.logging.Client()
handler = CloudLoggingHandler(client, name=LOGGER_NAME, transport=SyncTransport)
Argument of type "type[SyncTransport]" cannot be assigned to parameter "transport" of type "type[BackgroundThreadTransport]" in function "init"
"type[SyncTransport]" is incompatible with "type[BackgroundThreadTransport]"