Skip to content

Commit d93c972

Browse files
committed
chore: add storage-integration.yaml to replace generated __init__.py with handcrafted version
1 parent 7dd5a03 commit d93c972

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
description: Restore handwritten __init__.py for google-cloud-storage
2+
replacements:
3+
- paths: [
4+
packages/google-cloud-storage/google/cloud/storage/__init__.py
5+
]
6+
before: '(?s)\A(?:(?!\bClient\b).)*\Z'
7+
after: |
8+
# Copyright 2014 Google LLC
9+
#
10+
# Licensed under the Apache License, Version 2.0 (the "License");
11+
# you may not use this file except in compliance with the License.
12+
# You may obtain a copy of the License at
13+
#
14+
# http://www.apache.org/licenses/LICENSE-2.0
15+
#
16+
# Unless required by applicable law or agreed to in writing, software
17+
# distributed under the License is distributed on an "AS IS" BASIS,
18+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19+
# See the License for the specific language governing permissions and
20+
# limitations under the License.
21+
22+
"""Shortcut methods for getting set up with Google Cloud Storage.
23+
24+
You'll typically use these to get started with the API:
25+
26+
.. literalinclude:: snippets.py
27+
:start-after: START storage_get_started
28+
:end-before: END storage_get_started
29+
:dedent: 4
30+
31+
The main concepts with this API are:
32+
33+
- :class:`~google.cloud.storage.bucket.Bucket` which represents a particular
34+
bucket (akin to a mounted disk on a computer).
35+
36+
- :class:`~google.cloud.storage.blob.Blob` which represents a pointer to a
37+
particular entity in Cloud Storage (akin to a file path on a remote
38+
machine).
39+
"""
40+
41+
from google.cloud.storage.version import __version__ # isort: skip
42+
from google.cloud.storage.batch import Batch
43+
from google.cloud.storage.blob import Blob
44+
from google.cloud.storage.bucket import Bucket
45+
from google.cloud.storage.client import Client
46+
47+
__all__ = ["__version__", "Batch", "Blob", "Bucket", "Client"]
48+
count: 1

.librarian/state.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3241,6 +3241,7 @@ libraries:
32413241
- packages/google-cloud-storage/CHANGELOG.md
32423242
- docs/CHANGELOG.md
32433243
remove_regex:
3244+
- ^packages/google-cloud-storage/google/cloud/storage/__init__.py
32443245
- ^packages/google-cloud-storage/.coveragerc
32453246
- ^packages/google-cloud-storage/.flake8
32463247
- ^packages/google-cloud-storage/.repo-metadata.json
@@ -3258,6 +3259,7 @@ libraries:
32583259
- ^packages/google-cloud-storage/samples/generated_samples
32593260
- ^packages/google-cloud-storage/testing
32603261
- ^packages/google-cloud-storage/tests/__init__.py
3262+
- ^packages/google-cloud-storage/tests/unit/__init__.py
32613263
- ^packages/google-cloud-storage/tests/unit/gapic
32623264
- ^packages/google-cloud-storage/docs/conf.py
32633265
- ^packages/google-cloud-storage/docs/index.rst

0 commit comments

Comments
 (0)