Skip to content

Commit

Permalink
docs: pass explicit 'client' in '{Blob.Bucket}.from_string' examples
Browse files Browse the repository at this point in the history
See #540.
  • Loading branch information
tseaver committed Aug 19, 2021
1 parent bd72f5d commit 9b66ad9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion google/cloud/storage/blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def from_string(cls, uri, client=None):
>>> from google.cloud import storage
>>> from google.cloud.storage.blob import Blob
>>> client = storage.Client()
>>> blob = Blob.from_string("gs://bucket/object")
>>> blob = Blob.from_string("gs://bucket/object", client=client)
"""
from google.cloud.storage.bucket import Bucket

Expand Down
2 changes: 1 addition & 1 deletion google/cloud/storage/bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ def from_string(cls, uri, client=None):
>>> from google.cloud import storage
>>> from google.cloud.storage.bucket import Bucket
>>> client = storage.Client()
>>> bucket = Bucket.from_string("gs://bucket", client)
>>> bucket = Bucket.from_string("gs://bucket", client=client)
"""
scheme, netloc, path, query, frag = urlsplit(uri)

Expand Down

0 comments on commit 9b66ad9

Please sign in to comment.