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

Enable static type checking with pytype #298

Merged
merged 11 commits into from
Oct 5, 2018
Prev Previous commit
Next Next commit
Ignore pytype import errors in transport/.
These imports are not listed in setup.py, because they are optional --
it is assumed the user has them installed if needed. Disabling
import-error for these imports prevents useless errors from pytype.
  • Loading branch information
Solumin committed Sep 13, 2018
commit b4d8f9ae7c967551678743d23bf71d70a1889dda
2 changes: 1 addition & 1 deletion google/auth/transport/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import six
try:
import grpc
import grpc # pytype: disable=import-error
except ImportError as caught_exc: # pragma: NO COVER
six.raise_from(
ImportError(
Expand Down
4 changes: 3 additions & 1 deletion google/auth/transport/urllib3.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
certifi = None

try:
import urllib3
import urllib3 # pytype: disable=import-error
except ImportError as caught_exc: # pragma: NO COVER
import six
six.raise_from(
Expand All @@ -42,7 +42,9 @@
caught_exc,
)
import six
# pytype: disable=import-error
import urllib3.exceptions # pylint: disable=ungrouped-imports
# pytype: enable=import-error

from google.auth import exceptions
from google.auth import transport
Expand Down