Skip to content

Conversation

rchen152
Copy link
Contributor

Type-checks all of api_core outside of tests with pytype.

  • Adds pytype options to setup.cfg so the code can be type-checked with pytype -V{major.minor}.
  • Runs pytype -V3.5 and pytype -V3.6 under nox.
    Manually tested by pip-installing pytype and nox-automation in a Python 3.6 virtualenv.

@theacodes cc-ing you on this PR as you requested

With these changes, pytype can now be run on api_core with the
following steps in a Python 3.5 or 3.6 virtualenv:

$ git clone [email protected]:GoogleCloudPlatform/google-cloud-python.git
$ pip install googleapis-common-protos protobuf google-auth requests \
  setuptools six pytz futures grpcio grpcio-gcp
$ pip install pytype
$ cd google-cloud-python/api_core/
$ pytype -V3.5  # or 3.6
@rchen152 rchen152 requested a review from theacodes as a code owner September 26, 2018 21:27
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 26, 2018
@theacodes theacodes added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 27, 2018
@kokoro-team kokoro-team removed kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Sep 27, 2018
@theacodes theacodes added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 27, 2018
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 27, 2018
@theacodes theacodes merged commit 65d6eba into googleapis:master Sep 27, 2018
@theacodes
Copy link
Contributor

Thank you, @rchen152!

@rchen152 rchen152 deleted the pytype branch September 27, 2018 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants