8000 Add raises docstrings. · googleapis/google-cloud-python@51c0a3f · GitHub
[go: up one dir, main page]

Skip to content

Commit 51c0a3f

Browse files
committed
Add raises docstrings.
1 parent 5c6e92a commit 51c0a3f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

gcloud/credentials.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ def _get_signed_query_params(credentials, expiration, string_to_sign):
9595
:type string_to_sign: string
9696
:param string_to_sign: The string to be signed by the credentials.
9797
98+
:raises AttributeError: If :meth: sign_blob is unavailable.
99+
98100
:rtype: dict
99101
:returns: Query parameters matching the signing credentials with a
100102
signed payload.
@@ -123,6 +125,8 @@ def _get_expiration_seconds(expiration):
123125
:type expiration: int, long, datetime.datetime, datetime.timedelta
124126
:param expiration: When the signed URL should expire.
125127
128+
:raises TypeError: When expiration is not an integer.
129+
126130
:rtype: int
127131
:returns: a timestamp as an absolute number of seconds.
128132
"""

gcloud/test_credentials.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ def _callFUT(self, credentials, expiration, string_to_sign):
114114

115115
def test_it(self):
116116
import base64
117-
from gcloud._testing import _Monkey
118-
from gcloud import credentials as MUT
117+
# from gcloud._testing import _Monkey
118+
# from gcloud import credentials as MUT
119119

120120
SIG_BYTES = b'DEADBEEF'
121121
ACCOUNT_NAME = object()

0 commit comments

Comments
 (0)
0