Skip to content

Commit

Permalink
Turn google and google.ads into namespace stub packages
Browse files Browse the repository at this point in the history
This is necessary to comply with an update to PEP561: python/peps#2083

Closes #10
  • Loading branch information
henribru committed Oct 9, 2021
1 parent 2d29b82 commit 5758033
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ jobs:
- name: Run Mypy
run: |
mv google-stubs google
poetry run mypy google
poetry run mypy --namespace-packages --explicit-package-bases google
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,5 @@ The bare output from `stubgen` is used by the ransport classes. These may be typ
Some service methods allow you to pass in either a protobuf message or a dictionary for certain arguments.
There is no check that the dictionary conforms to the message structure, as this would require a `TypedDict` subclass
for each message.

Note that if you're using Mypy you need to use the `--namespace-packages` option as `google` and `google.ads` are namespace packages.
Empty file removed google-stubs/__init__.pyi
Empty file.
Empty file removed google-stubs/ads/__init__.pyi
Empty file.
File renamed without changes.

0 comments on commit 5758033

Please sign in to comment.