Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type-checking via pytype to api_core. #6116

Merged
merged 3 commits into from
Sep 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion api_core/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
from __future__ import absolute_import
import os

import nox
# https://github.com/google/importlab/issues/25
import nox # pytype: disable=import-error


@nox.session
Expand Down Expand Up @@ -108,6 +109,19 @@ def lint_setup_py(session):
'python', 'setup.py', 'check', '--restructuredtext', '--strict')


# No 2.7 due to https://github.com/google/importlab/issues/26.
# No 3.7 because pytype supports up to 3.6 only.
@nox.session
def pytype(session):
"""Run type-checking."""
session.interpreter = 'python3.6'
session.install('.',
'grpcio >= 1.8.2',
'grpcio-gcp >= 0.2.2',
'pytype >= 2018.9.26')
session.run('pytype')


@nox.session
def cover(session):
"""Run the final coverage report.
Expand Down
7 changes: 7 additions & 0 deletions api_core/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
[bdist_wheel]
universal = 1

[pytype]
python_version = 3.6
inputs =
.
exclude =
tests/