diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6719d13..90ca640 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -100,4 +100,4 @@ jobs: - name: Run Mypy run: | mv google-stubs google - poetry run mypy google + poetry run mypy --namespace-packages --explicit-package-base google diff --git a/README.md b/README.md index 99926bb..885856f 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ This package provides type stubs for the [googleapis-common-protos](https://pypi The stubs were created automatically by [mypy-protobuf](https://github.com/dropbox/mypy-protobuf). +Note that if you're using Mypy you need to use the `--namespace-packages` option as `google` and some of its subpackages are namespace packages. + ## Installation ```shell script $ pip install googleapis-common-protos-stubs diff --git a/google-stubs/__init__.pyi b/google-stubs/__init__.pyi deleted file mode 100644 index 0cc7ebf..0000000 --- a/google-stubs/__init__.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Any - -__path__: Any diff --git a/google-stubs/py.typed b/google-stubs/api/py.typed similarity index 100% rename from google-stubs/py.typed rename to google-stubs/api/py.typed diff --git a/google-stubs/gapic/__init__.pyi b/google-stubs/gapic/__init__.pyi deleted file mode 100644 index e69de29..0000000 diff --git a/google-stubs/gapic/metadata/py.typed b/google-stubs/gapic/metadata/py.typed new file mode 100644 index 0000000..b648ac9 --- /dev/null +++ b/google-stubs/gapic/metadata/py.typed @@ -0,0 +1 @@ +partial diff --git a/google-stubs/logging/__init__.pyi b/google-stubs/logging/__init__.pyi deleted file mode 100644 index 0cc7ebf..0000000 --- a/google-stubs/logging/__init__.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Any - -__path__: Any diff --git a/google-stubs/logging/type/py.typed b/google-stubs/logging/type/py.typed new file mode 100644 index 0000000..b648ac9 --- /dev/null +++ b/google-stubs/logging/type/py.typed @@ -0,0 +1 @@ +partial diff --git a/google-stubs/longrunning/py.typed b/google-stubs/longrunning/py.typed new file mode 100644 index 0000000..b648ac9 --- /dev/null +++ b/google-stubs/longrunning/py.typed @@ -0,0 +1 @@ +partial diff --git a/google-stubs/rpc/__init__.pyi b/google-stubs/rpc/__init__.pyi deleted file mode 100644 index 0cc7ebf..0000000 --- a/google-stubs/rpc/__init__.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Any - -__path__: Any diff --git a/google-stubs/rpc/context/py.typed b/google-stubs/rpc/context/py.typed new file mode 100644 index 0000000..b648ac9 --- /dev/null +++ b/google-stubs/rpc/context/py.typed @@ -0,0 +1 @@ +partial diff --git a/google-stubs/type/py.typed b/google-stubs/type/py.typed new file mode 100644 index 0000000..b648ac9 --- /dev/null +++ b/google-stubs/type/py.typed @@ -0,0 +1 @@ +partial diff --git a/pyproject.toml b/pyproject.toml index d69653b..2dbc0e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,8 @@ mypy = "^0.910" profile = "black" known_first_party = [ "google.api", - "google.logging", + "google.gapic.metadata", + "google.logging.type", "google.longrunning", "google.rpc", "google.type"