GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Add py.typed files to released packages · Issue #79 · googleapis/python-secret-manager
This repository was archived by the owner on Sep 5, 2023. It is now read-only.
This repository was archived by the owner on Sep 5, 2023. It is now read-only.
Add py.typed files to released packages #79Copy link Copy link Closed Labels api: secretmanagerIssues related to the googleapis/python-secret-manager API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design. DescriptionIs your feature request related to a problem? Please describe. # venv & package install $ python3 -m venv venv && source venv/bin/activate $ pip install google-cloud-secret-manager mypy ... Successfully installed cachetools-4.2.1 certifi-2020.12.5 chardet-4.0.0 google-api-core-1.25.1 google-auth-1.24.0 google-cloud-secret-manager-2.2.0 googleapis-common-protos-1.52.0 grpc-google-iam-v1-0.12.3 grpcio-1.35.0 idna-2.10 libcst-0.3.16 mypy-0.800 mypy-extensions-0.4.3 proto-plus-1.13.0 protobuf-3.14.0 pyasn1-0.4.8 pyasn1-modules-0.2.8 pytz-2021.1 pyyaml-5.4.1 requests-2.25.1 rsa-4.7 six-1.15.0 typed-ast-1.4.2 typing-extensions-3.7.4.3 typing-inspect-0.6.0 urllib3-1.26.3 # no py.typed file in google/cloud/secretmanager $ find . -iname "py.typed" ./venv/lib/python3.8/site-packages/mypy/py.typed ./venv/lib/python3.8/site-packages/libcst/py.typed # mypy complains about the untyped library $ echo "from google.cloud.secretmanager import SecretManagerServiceClient" >> main.py $ mypy main.py main.py:1: error: Skipping analyzing 'google.cloud.secretmanager': found module but no type hints or library stubs main.py:1: note: See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports Found 1 error in 1 file (checked 1 source file) # adding the py.typed file in both secretmanager/ and secretmanager_v1/ , mypy doesn't complain anymore $ touch venv/lib/python3.8/site-packages/google/cloud/secretmanager{,_v1}/py.typed $ mypy main.py Success: no issues found in 1 source file # dummy test case to check mypy finds errors $ echo "SecretManagerServiceClient.parse_secret_path(1)" >> main.py $ mypy main.py main.py:2: error: Argument 1 to "parse_secret_path" of "SecretManagerServiceClient" has incompatible type "int"; expected "str" Found 1 error in 1 file (checked 1 source file) Describe the solution you'd like
Describe alternatives you've considered Versions Thanks Reacted by Yurii Serhiichuk Activity
MetadataMetadataAssigneesLabelsapi: secretmanagerIssues related to the googleapis/python-secret-manager API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design. TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |