Skip to content

Passing a dict to GoogleAdsClient.load_from_dict gives error on pyright #53

@mxfunc

Description

@mxfunc

Can anyone help with the following issue in pyright:

from google.ads.googleads.client import GoogleAdsClient
params = {
   "client_id": "1234"
}
GoogleAdsClient.load_from_dict(params, version="v19")
error: Argument of type "dict[str, Any]" cannot be assigned to parameter "config_dict" of type "_ConfigDataUnparsed" in function "load_from_dict"
    Type "dict[str, Any]" is not assignable to type "_ConfigDataUnparsed"
      "dict[str, Any]" is not assignable to "_InstalledAppConfigDataUnparsed"
      "dict[str, Any]" is not assignable to "_ServiceAccountConfigDataUnparsed" (reportArgumentType)
1 error, 0 warnings, 0 information 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions