Fix a few lint errors
diff --git a/google/auth/app_engine.py b/google/auth/app_engine.py
index 846bcec..ec89dc0 100644
--- a/google/auth/app_engine.py
+++ b/google/auth/app_engine.py
@@ -65,6 +65,9 @@
Raises:
EnvironmentError: If the App Engine APIs are unavailable.
"""
+ # pylint: disable=missing-raises-doc
+ # Pylint rightfully thinks EnvironmentError is OSError, but doesn't
+ # realize it's a valid alias.
if app_identity is None:
raise EnvironmentError(
'The App Engine APIs are not available.')
@@ -92,6 +95,9 @@
Raises:
EnvironmentError: If the App Engine APIs are unavailable.
"""
+ # pylint: disable=missing-raises-doc
+ # Pylint rightfully thinks EnvironmentError is OSError, but doesn't
+ # realize it's a valid alias.
if app_identity is None:
raise EnvironmentError(
'The App Engine APIs are not available.')
diff --git a/google/auth/crypt.py b/google/auth/crypt.py
index 6151b29..1305cc8 100644
--- a/google/auth/crypt.py
+++ b/google/auth/crypt.py
@@ -204,7 +204,7 @@
key_id (str): An optional key id used to identify the private key.
Returns:
- ~google.auth.crypt.Signer: The constructed signer.
+ google.auth.crypt.Signer: The constructed signer.
Raises:
ValueError: If the key cannot be parsed as PKCS#1 or PKCS#8 in
@@ -242,7 +242,7 @@
format.
Returns:
- ~google.auth.crypt.Signer: The constructed signer.
+ google.auth.crypt.Signer: The constructed signer.
Raises:
ValueError: If the info is not in the expected format.
@@ -265,7 +265,7 @@
filename (str): The path to the service account .json file.
Returns:
- ~google.auth.crypt.Signer: The constructed signer.
+ google.auth.crypt.Signer: The constructed signer.
"""
with io.open(filename, 'r', encoding='utf-8') as json_file:
data = json.load(json_file)
diff --git a/google/auth/transport/grpc.py b/google/auth/transport/grpc.py
index 4062972..e6a5eb7 100644
--- a/google/auth/transport/grpc.py
+++ b/google/auth/transport/grpc.py
@@ -33,6 +33,10 @@
object used to refresh credentials as needed.
"""
def __init__(self, credentials, request):
+ # pylint: disable=no-value-for-parameter
+ # pylint doesn't realize that the super method takes no arguments
+ # because this class is the same name as the superclass.
+ super(AuthMetadataPlugin, self).__init__()
self._credentials = credentials
self._request = request
diff --git a/scripts/run_pylint.py b/scripts/run_pylint.py
index b06a98c..e9ac7ec 100644
--- a/scripts/run_pylint.py
+++ b/scripts/run_pylint.py
@@ -43,6 +43,7 @@
'protected-access',
'redefined-variable-type',
'similarities',
+ 'no-else-return',
],
},
}