Giter VIP home page Giter VIP logo

google-ads-stubs's Issues

feature request: Support for v16 of Google API

v16 of Google Ads API was released a few weeks back and exposes a new set of modules, .v16, for most types of the google-ads package. Here's the release notes: https://github.com/googleads/google-ads-python/releases/tag/23.1.0

Importing from the new v16 modules results in mypy complaining, even with this stubs library present:

tap_googleads/streams/base.py:5: error: Skipping analyzing "google.ads.googleads.v16": module is installed, but missing library stubs or py.typed marker  [import-untyped]

No huge changes seem present in the new API version, but new users will likely use .v16 in their code and will be confused by this library not working out of the box.

Thanks for the great work! This is a great resource to run in tandem with mypy to minimize "dumb" bugs in production.

Ideas on using stubs alongside other google packages

Hello, me again.
These stubs have been awesome. Thanks again.

A little while ago I noticed PyCharm complains about missing imports in other, non ads, google packages. Guessing due to their namespacing pattern of having completely separate pypi packages install in the same google/ folder.

As a workaround, I've just been uninstalling these stubs when doing non ads related work. Which works no problem, so this isn't anything important.

I was just curious if you knew any workarounds to make these coexist.

Screen Shot 2020-02-15 at 8 49 59 PM

Support versions past v9

Unfortunately this involves throwing away almost all of the stubs and redoing them as v10 completely changed how protobuf objects are represented ... Can't use mypy-protobuf either, would have to write a custom stub generator for proto-plus-python.

Technically the existing work could be used for the use_proto_plus=False case, but I suspect most people will use use_proto_plus=True.

Incompatibility with PyCharm / VSC Pylance

Following the first issue of this repository #1, I've discovered that my import failures on Pycharm and VSC where coming from the editor themselves and not this package.

For reference, here are the opened tickets on the subject for PyCharm:

I was unable to locate similar issues for Pylance. If someone have it working in Visual, please let me know :)

As it seems unlikely that it will be fixed in the near future, would you accept a PR with a note on the IDEs current limitation and non implementation of PEP-561 in the 'Caveats' section of the package README ? It seems to me like a major pain point for users of this package, and something I would like to know before using it.

Thanks !

Issues using stubs

Hi,

I'd be really to stoked to have typechecking for google-ads so interested in getting this working.

Using versions:

google-ads==5.1.0
google-ads-stubs==3.1.0

Currently having the following issues:

(Partially resolved issue) 1. re namespace_packages

With config:

[mypy]
namespace_packages = True

getting errors like

some/file.py:2: error: Module 'google.cloud' has no attribute 'bigquery'  [attr-defined]
some/file2.py:9: error: Module 'google.cloud' has no attribute 'storage'  [attr-defined]

Making namespace_packages = False avoids these errors.

Unresolved 2. re standard usage

With an example file like:

from google.ads import google_ads
def get_client() -> google_ads.client.GoogleAdsClient:
    """Get an authenticated Google Ads client."""
   ... [pulling credentials] ...
   return google_ads.client.GoogleAdsClient.load_from_dict(credentials)  

gives error:

example/file.py:2: error: Name 'google_ads.client.GoogleAdsClient' is not defined  [name-defined]
example/file.py:5 error: Module has no attribute "client"  [attr-defined]

Any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.