Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit 59faa81

Browse files
chore(python): use black==22.3.0 (#70)
Source-Link: googleapis/synthtool@6fab84a Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe
1 parent 53e4043 commit 59faa81

File tree

4 files changed

+130
-32
lines changed

4 files changed

+130
-32
lines changed

.github/.OwlBot.lock.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:2d13c2172a5d6129c861edaa48b60ead15aeaf58aa75e02d870c4cbdfa63aaba
16+
digest: sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe

docs/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,10 @@
361361
intersphinx_mapping = {
362362
"python": ("https://python.readthedocs.org/en/latest/", None),
363363
"google-auth": ("https://googleapis.dev/python/google-auth/latest/", None),
364-
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
364+
"google.api_core": (
365+
"https://googleapis.dev/python/google-api-core/latest/",
366+
None,
367+
),
365368
"grpc": ("https://grpc.github.io/grpc/python/", None),
366369
"proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None),
367370
"protobuf": ("https://googleapis.dev/python/protobuf/latest/", None),

google/cloud/source_context_v1/types/source_context.py

Lines changed: 119 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,28 @@ class SourceContext(proto.Message):
6969
"""
7070

7171
cloud_repo = proto.Field(
72-
proto.MESSAGE, number=1, oneof="context", message="CloudRepoSourceContext",
72+
proto.MESSAGE,
73+
number=1,
74+
oneof="context",
75+
message="CloudRepoSourceContext",
7376
)
7477
cloud_workspace = proto.Field(
75-
proto.MESSAGE, number=2, oneof="context", message="CloudWorkspaceSourceContext",
78+
proto.MESSAGE,
79+
number=2,
80+
oneof="context",
81+
message="CloudWorkspaceSourceContext",
7682
)
7783
gerrit = proto.Field(
78-
proto.MESSAGE, number=3, oneof="context", message="GerritSourceContext",
84+
proto.MESSAGE,
85+
number=3,
86+
oneof="context",
87+
message="GerritSourceContext",
7988
)
8089
git = proto.Field(
81-
proto.MESSAGE, number=6, oneof="context", message="GitSourceContext",
90+
proto.MESSAGE,
91+
number=6,
92+
oneof="context",
93+
message="GitSourceContext",
8294
)
8395

8496

@@ -93,8 +105,16 @@ class ExtendedSourceContext(proto.Message):
93105
Labels with user defined metadata.
94106
"""
95107

96-
context = proto.Field(proto.MESSAGE, number=1, message="SourceContext",)
97-
labels = proto.MapField(proto.STRING, proto.STRING, number=2,)
108+
context = proto.Field(
109+
proto.MESSAGE,
110+
number=1,
111+
message="SourceContext",
112+
)
113+
labels = proto.MapField(
114+
proto.STRING,
115+
proto.STRING,
116+
number=2,
117+
)
98118

99119

100120
class AliasContext(proto.Message):
@@ -114,8 +134,15 @@ class Kind(proto.Enum):
114134
MOVABLE = 2
115135
OTHER = 4
116136

117-
kind = proto.Field(proto.ENUM, number=1, enum=Kind,)
118-
name = proto.Field(proto.STRING, number=2,)
137+
kind = proto.Field(
138+
proto.ENUM,
139+
number=1,
140+
enum=Kind,
141+
)
142+
name = proto.Field(
143+
proto.STRING,
144+
number=2,
145+
)
119146

120147

121148
class CloudRepoSourceContext(proto.Message):
@@ -146,11 +173,26 @@ class CloudRepoSourceContext(proto.Message):
146173
This field is a member of `oneof`_ ``revision``.
147174
"""
148175

149-
repo_id = proto.Field(proto.MESSAGE, number=1, message="RepoId",)
150-
revision_id = proto.Field(proto.STRING, number=2, oneof="revision",)
151-
alias_name = proto.Field(proto.STRING, number=3, oneof="revision",)
176+
repo_id = proto.Field(
177+
proto.MESSAGE,
178+
number=1,
179+
message="RepoId",
180+
)
181+
revision_id = proto.Field(
182+
proto.STRING,
183+
number=2,
184+
oneof="revision",
185+
)
186+
alias_name = proto.Field(
187+
proto.STRING,
188+
number=3,
189+
oneof="revision",
190+
)
152191
alias_context = proto.Field(
153-
proto.MESSAGE, number=4, oneof="revision", message="AliasContext",
192+
proto.MESSAGE,
193+
number=4,
194+
oneof="revision",
195+
message="AliasContext",
154196
)
155197

156198

@@ -166,8 +208,15 @@ class CloudWorkspaceSourceContext(proto.Message):
166208
most recent snapshot.
167209
"""
168210

169-
workspace_id = proto.Field(proto.MESSAGE, number=1, message="CloudWorkspaceId",)
170-
snapshot_id = proto.Field(proto.STRING, number=2,)
211+
workspace_id = proto.Field(
212+
proto.MESSAGE,
213+
number=1,
214+
message="CloudWorkspaceId",
215+
)
216+
snapshot_id = proto.Field(
217+
proto.STRING,
218+
number=2,
219+
)
171220

172221

173222
class GerritSourceContext(proto.Message):
@@ -202,12 +251,29 @@ class GerritSourceContext(proto.Message):
202251
This field is a member of `oneof`_ ``revision``.
203252
"""
204253

205-
host_uri = proto.Field(proto.STRING, number=1,)
206-
gerrit_project = proto.Field(proto.STRING, number=2,)
207-
revision_id = proto.Field(proto.STRING, number=3, oneof="revision",)
208-
alias_name = proto.Field(proto.STRING, number=4, oneof="revision",)
254+
host_uri = proto.Field(
255+
proto.STRING,
256+
number=1,
257+
)
258+
gerrit_project = proto.Field(
259+
proto.STRING,
260+
number=2,
261+
)
262+
revision_id = proto.Field(
263+
proto.STRING,
264+
number=3,
265+
oneof="revision",
266+
)
267+
alias_name = proto.Field(
268+
proto.STRING,
269+
number=4,
270+
oneof="revision",
271+
)
209272
alias_context = proto.Field(
210-
proto.MESSAGE, number=5, oneof="revision", message="AliasContext",
273+
proto.MESSAGE,
274+
number=5,
275+
oneof="revision",
276+
message="AliasContext",
211277
)
212278

213279

@@ -223,8 +289,14 @@ class GitSourceContext(proto.Message):
223289
required.
224290
"""
225291

226-
url = proto.Field(proto.STRING, number=1,)
227-
revision_id = proto.Field(proto.STRING, number=2,)
292+
url = proto.Field(
293+
proto.STRING,
294+
number=1,
295+
)
296+
revision_id = proto.Field(
297+
proto.STRING,
298+
number=2,
299+
)
228300

229301

230302
class RepoId(proto.Message):
@@ -251,9 +323,16 @@ class RepoId(proto.Message):
251323
"""
252324

253325
project_repo_id = proto.Field(
254-
proto.MESSAGE, number=1, oneof="id", message="ProjectRepoId",
326+
proto.MESSAGE,
327+
number=1,
328+
oneof="id",
329+
message="ProjectRepoId",
330+
)
331+
uid = proto.Field(
332+
proto.STRING,
333+
number=2,
334+
oneof="id",
255335
)
256-
uid = proto.Field(proto.STRING, number=2, oneof="id",)
257336

258337

259338
class ProjectRepoId(proto.Message):
@@ -268,8 +347,14 @@ class ProjectRepoId(proto.Message):
268347
default repo.
269348
"""
270349

271-
project_id = proto.Field(proto.STRING, number=1,)
272-
repo_name = proto.Field(proto.STRING, number=2,)
350+
project_id = proto.Field(
351+
proto.STRING,
352+
number=1,
353+
)
354+
repo_name = proto.Field(
355+
proto.STRING,
356+
number=2,
357+
)
273358

274359

275360
class CloudWorkspaceId(proto.Message):
@@ -286,8 +371,15 @@ class CloudWorkspaceId(proto.Message):
286371
the Source API's CreateWorkspace method.
287372
"""
288373

289-
repo_id = proto.Field(proto.MESSAGE, number=1, message="RepoId",)
290-
name = proto.Field(proto.STRING, number=2,)
374+
repo_id = proto.Field(
375+
proto.MESSAGE,
376+
number=1,
377+
message="RepoId",
378+
)
379+
name = proto.Field(
380+
proto.STRING,
381+
number=2,
382+
)
291383

292384

293385
__all__ = tuple(sorted(__protobuf__.manifest))

noxfile.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import nox
2525

2626

27-
BLACK_VERSION = "black==19.10b0"
27+
BLACK_VERSION = "black==22.3.0"
2828
BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
2929

3030
DEFAULT_PYTHON_VERSION = "3.8"
@@ -57,7 +57,9 @@ def lint(session):
5757
"""
5858
session.install("flake8", BLACK_VERSION)
5959
session.run(
60-
"black", "--check", *BLACK_PATHS,
60+
"black",
61+
"--check",
62+
*BLACK_PATHS,
6163
)
6264
session.run("flake8", "google", "tests")
6365

@@ -67,7 +69,8 @@ def blacken(session):
6769
"""Run black. Format code to uniform standard."""
6870
session.install(BLACK_VERSION)
6971
session.run(
70-
"black", *BLACK_PATHS,
72+
"black",
73+
*BLACK_PATHS,
7174
)
7275

7376

0 commit comments

Comments
 (0)