Skip to content

Commit 4f19960

Browse files
committed
Add support for v6
1 parent 8ede384 commit 4f19960

2,433 files changed

Lines changed: 78983 additions & 76397 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
[![PyPI version](https://badge.fury.io/py/google-ads-stubs.svg)](https://badge.fury.io/py/google-ads-stubs)
44

5-
This package provides type stubs for the [Google Ads API Client Library for Python](https://github.com/googleads/google-ads-python). It's currently compatible with v.7.0.0 of this library. It allows you to type check usage of the library with e.g. [mypy](http://mypy-lang.org/) and will also improve autocomplete in many editors.
5+
This package provides type stubs for the [Google Ads API Client Library for Python](https://github.com/googleads/google-ads-python).
6+
It's currently compatible with v.8.0.0 of this library. It allows you to type check usage of the library with e.g. [mypy](http://mypy-lang.org/) and will also improve autocomplete in many editors.
67

78
**This is in no way affiliated with Google.**
89

google-stubs/ads/google_ads/client.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ from typing_extensions import Literal
55

66
from google.ads.google_ads.config import _ConfigDataUnparsed
77

8-
_V2 = Literal["v2"]
98
_V3 = Literal["v3"]
109
_V4 = Literal["v4"]
1110
_V5 = Literal["v5"]
12-
_V = Union[_V2, _V3, _V4, _V5]
11+
_V = Union[_V3, _V4, _V5]
1312

1413
class GoogleAdsClient:
1514
credentials: Credentials = ...

google-stubs/ads/google_ads/errors.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ from typing import Union
22

33
import grpc # type: ignore
44

5-
from google.ads.google_ads.v2.proto.errors.errors_pb2 import (
6-
GoogleAdsFailure as GoogleAdsFailureV2,
7-
)
85
from google.ads.google_ads.v3.proto.errors.errors_pb2 import (
96
GoogleAdsFailure as GoogleAdsFailureV3,
107
)
@@ -14,9 +11,12 @@ from google.ads.google_ads.v4.proto.errors.errors_pb2 import (
1411
from google.ads.google_ads.v5.proto.errors.errors_pb2 import (
1512
GoogleAdsFailure as GoogleAdsFailureV5,
1613
)
14+
from google.ads.google_ads.v6.proto.errors.errors_pb2 import (
15+
GoogleAdsFailure as GoogleAdsFailureV6,
16+
)
1717

1818
GoogleAdsFailure = Union[
19-
GoogleAdsFailureV2, GoogleAdsFailureV3, GoogleAdsFailureV4, GoogleAdsFailureV5
19+
GoogleAdsFailureV3, GoogleAdsFailureV4, GoogleAdsFailureV5, GoogleAdsFailureV6
2020
]
2121

2222
class GoogleAdsException(Exception):
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
from typing import Any
1+
from typing import Any, Sequence, Union
2+
3+
from google.protobuf.message import Message
24

35
class ResourceName:
46
@classmethod
57
def format_composite(cls, *arg: str) -> str: ...
68

79
def get_nested_attr(obj: Any, attr: str, *args: Any) -> Any: ...
10+
def set_nested_message_field(
11+
message: Message, field_path: Union[str, Sequence[str]], value: Any
12+
) -> None: ...
813
def convert_upper_case_to_snake_case(string: str) -> str: ...
914
def convert_snake_case_to_upper_case(string: str) -> str: ...

0 commit comments

Comments
 (0)