Skip to content

Commit

Permalink
Add support for v6
Browse files Browse the repository at this point in the history
  • Loading branch information
henribru committed Nov 13, 2020
1 parent 8ede384 commit 4f19960
Show file tree
Hide file tree
Showing 2,433 changed files with 78,983 additions and 76,397 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

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

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.
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.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.

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

Expand Down
3 changes: 1 addition & 2 deletions google-stubs/ads/google_ads/client.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ from typing_extensions import Literal

from google.ads.google_ads.config import _ConfigDataUnparsed

_V2 = Literal["v2"]
_V3 = Literal["v3"]
_V4 = Literal["v4"]
_V5 = Literal["v5"]
_V = Union[_V2, _V3, _V4, _V5]
_V = Union[_V3, _V4, _V5]

class GoogleAdsClient:
credentials: Credentials = ...
Expand Down
8 changes: 4 additions & 4 deletions google-stubs/ads/google_ads/errors.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ from typing import Union

import grpc # type: ignore

from google.ads.google_ads.v2.proto.errors.errors_pb2 import (
GoogleAdsFailure as GoogleAdsFailureV2,
)
from google.ads.google_ads.v3.proto.errors.errors_pb2 import (
GoogleAdsFailure as GoogleAdsFailureV3,
)
Expand All @@ -14,9 +11,12 @@ from google.ads.google_ads.v4.proto.errors.errors_pb2 import (
from google.ads.google_ads.v5.proto.errors.errors_pb2 import (
GoogleAdsFailure as GoogleAdsFailureV5,
)
from google.ads.google_ads.v6.proto.errors.errors_pb2 import (
GoogleAdsFailure as GoogleAdsFailureV6,
)

GoogleAdsFailure = Union[
GoogleAdsFailureV2, GoogleAdsFailureV3, GoogleAdsFailureV4, GoogleAdsFailureV5
GoogleAdsFailureV3, GoogleAdsFailureV4, GoogleAdsFailureV5, GoogleAdsFailureV6
]

class GoogleAdsException(Exception):
Expand Down
7 changes: 6 additions & 1 deletion google-stubs/ads/google_ads/util.pyi
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
from typing import Any
from typing import Any, Sequence, Union

from google.protobuf.message import Message

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

def get_nested_attr(obj: Any, attr: str, *args: Any) -> Any: ...
def set_nested_message_field(
message: Message, field_path: Union[str, Sequence[str]], value: Any
) -> None: ...
def convert_upper_case_to_snake_case(string: str) -> str: ...
def convert_snake_case_to_upper_case(string: str) -> str: ...
Loading

0 comments on commit 4f19960

Please sign in to comment.