Skip to content

Commit 62d1543

Browse files
docs(storage): fix indent in code blocks (#171)
Fixes #170
1 parent 5e60991 commit 62d1543

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

google/cloud/storage/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
.. literalinclude:: snippets.py
2020
:start-after: [START storage_get_started]
2121
:end-before: [END storage_get_started]
22+
:dedent: 4
2223
2324
The main concepts with this API are:
2425

google/cloud/storage/acl.py

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
.. literalinclude:: snippets.py
2222
:start-after: [START client_bucket_acl]
2323
:end-before: [END client_bucket_acl]
24+
:dedent: 4
2425
2526
2627
Adding and removing permissions can be done with the following methods
@@ -52,13 +53,15 @@
5253
.. literalinclude:: snippets.py
5354
:start-after: [START acl_user_settings]
5455
:end-before: [END acl_user_settings]
56+
:dedent: 4
5557
5658
After that, you can save any changes you make with the
5759
:func:`google.cloud.storage.acl.ACL.save` method:
5860
5961
.. literalinclude:: snippets.py
6062
:start-after: [START acl_save]
6163
:end-before: [END acl_save]
64+
:dedent: 4
6265
6366
You can alternatively save any existing :class:`google.cloud.storage.acl.ACL`
6467
object (whether it was created by a factory method or not) from a
@@ -67,13 +70,15 @@
6770
.. literalinclude:: snippets.py
6871
:start-after: [START acl_save_bucket]
6972
:end-before: [END acl_save_bucket]
73+
:dedent: 4
7074
7175
To get the list of ``entity`` and ``role`` for each unique pair, the
7276
:class:`ACL` class is iterable:
7377
7478
.. literalinclude:: snippets.py
7579
:start-after: [START acl_print]
7680
:end-before: [END acl_print]
81+
:dedent: 4
7782
7883
This list of tuples can be used as the ``entity`` and ``role`` fields
7984
when sending metadata for ACLs to the API.

google/cloud/storage/bucket.py

+8
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,7 @@ def get_blob(
968968
.. literalinclude:: snippets.py
969969
:start-after: [START get_blob]
970970
:end-before: [END get_blob]
971+
:dedent: 4
971972
972973
If :attr:`user_project` is set, bills the API request to that project.
973974
@@ -1381,6 +1382,7 @@ def delete_blob(
13811382
.. literalinclude:: snippets.py
13821383
:start-after: [START delete_blob]
13831384
:end-before: [END delete_blob]
1385+
:dedent: 4
13841386
13851387
If :attr:`user_project` is set, bills the API request to that project.
13861388
@@ -1431,6 +1433,7 @@ def delete_blob(
14311433
.. literalinclude:: snippets.py
14321434
:start-after: [START delete_blobs]
14331435
:end-before: [END delete_blobs]
1436+
:dedent: 4
14341437
14351438
"""
14361439
client = self._require_client(client)
@@ -2105,6 +2108,7 @@ def add_lifecycle_delete_rule(self, **kw):
21052108
.. literalinclude:: snippets.py
21062109
:start-after: [START add_lifecycle_delete_rule]
21072110
:end-before: [END add_lifecycle_delete_rule]
2111+
:dedent: 4
21082112
21092113
:type kw: dict
21102114
:params kw: arguments passed to :class:`LifecycleRuleConditions`.
@@ -2122,6 +2126,7 @@ def add_lifecycle_set_storage_class_rule(self, storage_class, **kw):
21222126
.. literalinclude:: snippets.py
21232127
:start-after: [START add_lifecycle_set_storage_class_rule]
21242128
:end-before: [END add_lifecycle_set_storage_class_rule]
2129+
:dedent: 4
21252130
21262131
:type storage_class: str, one of :attr:`STORAGE_CLASSES`.
21272132
:param storage_class: new storage class to assign to matching items.
@@ -2465,12 +2470,14 @@ def configure_website(self, main_page_suffix=None, not_found_page=None):
24652470
.. literalinclude:: snippets.py
24662471
:start-after: [START configure_website]
24672472
:end-before: [END configure_website]
2473+
:dedent: 4
24682474
24692475
You probably should also make the whole bucket public:
24702476
24712477
.. literalinclude:: snippets.py
24722478
:start-after: [START make_public]
24732479
:end-before: [END make_public]
2480+
:dedent: 4
24742481
24752482
This says: "Make the bucket public, and all the stuff already in
24762483
the bucket, and anything else I add to the bucket. Just make it
@@ -2804,6 +2811,7 @@ def generate_upload_policy(self, conditions, expiration=None, client=None):
28042811
.. literalinclude:: snippets.py
28052812
:start-after: [START policy_document]
28062813
:end-before: [END policy_document]
2814+
:dedent: 4
28072815
28082816
.. _policy documents:
28092817
https://cloud.google.com/storage/docs/xml-api\

google/cloud/storage/client.py

+4
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ def get_bucket(
329329
.. literalinclude:: snippets.py
330330
:start-after: [START get_bucket]
331331
:end-before: [END get_bucket]
332+
:dedent: 4
332333
333334
Get a bucket using a resource.
334335
@@ -367,6 +368,7 @@ def lookup_bucket(
367368
.. literalinclude:: snippets.py
368369
:start-after: [START lookup_bucket]
369370
:end-before: [END lookup_bucket]
371+
:dedent: 4
370372
371373
:type bucket_name: str
372374
:param bucket_name: The name of the bucket to get.
@@ -461,6 +463,7 @@ def create_bucket(
461463
.. literalinclude:: snippets.py
462464
:start-after: [START create_bucket]
463465
:end-before: [END create_bucket]
466+
:dedent: 4
464467
465468
Create a bucket using a resource.
466469
@@ -702,6 +705,7 @@ def list_buckets(
702705
.. literalinclude:: snippets.py
703706
:start-after: [START list_buckets]
704707
:end-before: [END list_buckets]
708+
:dedent: 4
705709
706710
This implements "storage.buckets.list".
707711

0 commit comments

Comments
 (0)