Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ead25e4

Browse filesBrowse files
tswastJon Wayne Parrott
authored andcommitted
Documentation: DefaultCredentialsError could be raised if credentials not supplied (#4688)
Document DefaultCredentialsError could be raised if credentials not supplied. Also, use Napoleon-style docs for the changed docs.
1 parent 6925138 commit ead25e4
Copy full SHA for ead25e4

File tree

Expand file treeCollapse file tree

1 file changed

+18
-14
lines changed
Open diff view settings
Filter options
  • packages/google-cloud-core/google/cloud
Expand file treeCollapse file tree

1 file changed

+18
-14
lines changed
Open diff view settings
Collapse file

‎packages/google-cloud-core/google/cloud/client.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-core/google/cloud/client.py
+18-14Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -94,20 +94,24 @@ class Client(_ClientFactoryMixin):
9494
Callers and subclasses may seek to use the private key from
9595
``credentials`` to sign data.
9696
97-
:type credentials: :class:`~google.auth.credentials.Credentials`
98-
:param credentials: (Optional) The OAuth2 Credentials to use for this
99-
client. If not passed (and if no ``_http`` object is
100-
passed), falls back to the default inferred from the
101-
environment.
102-
103-
:type _http: :class:`~requests.Session`
104-
:param _http: (Optional) HTTP object to make requests. Can be any object
105-
that defines ``request()`` with the same interface as
106-
:meth:`requests.Session.request`. If not passed, an
107-
``_http`` object is created that is bound to the
108-
``credentials`` for the current object.
109-
This parameter should be considered private, and could
110-
change in the future.
97+
Args:
98+
credentials (google.auth.credentials.Credentials):
99+
(Optional) The OAuth2 Credentials to use for this client. If not
100+
passed (and if no ``_http`` object is passed), falls back to the
101+
default inferred from the environment.
102+
_http (requests.Session):
103+
(Optional) HTTP object to make requests. Can be any object that
104+
defines ``request()`` with the same interface as
105+
:meth:`requests.Session.request`. If not passed, an ``_http``
106+
object is created that is bound to the ``credentials`` for the
107+
current object.
108+
This parameter should be considered private, and could change in
109+
the future.
110+
111+
Raises:
112+
google.auth.exceptions.DefaultCredentialsError:
113+
Raised if ``credentials`` is not specified and the library fails
114+
to acquire default credentials.
111115
"""
112116

113117
SCOPE = None

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.