diff --git a/packages/google-cloud-source-context/.github/.OwlBot.lock.yaml b/packages/google-cloud-source-context/.github/.OwlBot.lock.yaml index 88076277a251..87dd00611576 100644 --- a/packages/google-cloud-source-context/.github/.OwlBot.lock.yaml +++ b/packages/google-cloud-source-context/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:2d13c2172a5d6129c861edaa48b60ead15aeaf58aa75e02d870c4cbdfa63aaba + digest: sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe diff --git a/packages/google-cloud-source-context/docs/conf.py b/packages/google-cloud-source-context/docs/conf.py index dad92cf7887e..5b66a2549234 100644 --- a/packages/google-cloud-source-context/docs/conf.py +++ b/packages/google-cloud-source-context/docs/conf.py @@ -361,7 +361,10 @@ intersphinx_mapping = { "python": ("https://python.readthedocs.org/en/latest/", None), "google-auth": ("https://googleapis.dev/python/google-auth/latest/", None), - "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,), + "google.api_core": ( + "https://googleapis.dev/python/google-api-core/latest/", + None, + ), "grpc": ("https://grpc.github.io/grpc/python/", None), "proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None), "protobuf": ("https://googleapis.dev/python/protobuf/latest/", None), diff --git a/packages/google-cloud-source-context/google/cloud/source_context_v1/types/source_context.py b/packages/google-cloud-source-context/google/cloud/source_context_v1/types/source_context.py index 42523d4b1aee..f6530511ec49 100644 --- a/packages/google-cloud-source-context/google/cloud/source_context_v1/types/source_context.py +++ b/packages/google-cloud-source-context/google/cloud/source_context_v1/types/source_context.py @@ -69,16 +69,28 @@ class SourceContext(proto.Message): """ cloud_repo = proto.Field( - proto.MESSAGE, number=1, oneof="context", message="CloudRepoSourceContext", + proto.MESSAGE, + number=1, + oneof="context", + message="CloudRepoSourceContext", ) cloud_workspace = proto.Field( - proto.MESSAGE, number=2, oneof="context", message="CloudWorkspaceSourceContext", + proto.MESSAGE, + number=2, + oneof="context", + message="CloudWorkspaceSourceContext", ) gerrit = proto.Field( - proto.MESSAGE, number=3, oneof="context", message="GerritSourceContext", + proto.MESSAGE, + number=3, + oneof="context", + message="GerritSourceContext", ) git = proto.Field( - proto.MESSAGE, number=6, oneof="context", message="GitSourceContext", + proto.MESSAGE, + number=6, + oneof="context", + message="GitSourceContext", ) @@ -93,8 +105,16 @@ class ExtendedSourceContext(proto.Message): Labels with user defined metadata. """ - context = proto.Field(proto.MESSAGE, number=1, message="SourceContext",) - labels = proto.MapField(proto.STRING, proto.STRING, number=2,) + context = proto.Field( + proto.MESSAGE, + number=1, + message="SourceContext", + ) + labels = proto.MapField( + proto.STRING, + proto.STRING, + number=2, + ) class AliasContext(proto.Message): @@ -114,8 +134,15 @@ class Kind(proto.Enum): MOVABLE = 2 OTHER = 4 - kind = proto.Field(proto.ENUM, number=1, enum=Kind,) - name = proto.Field(proto.STRING, number=2,) + kind = proto.Field( + proto.ENUM, + number=1, + enum=Kind, + ) + name = proto.Field( + proto.STRING, + number=2, + ) class CloudRepoSourceContext(proto.Message): @@ -146,11 +173,26 @@ class CloudRepoSourceContext(proto.Message): This field is a member of `oneof`_ ``revision``. """ - repo_id = proto.Field(proto.MESSAGE, number=1, message="RepoId",) - revision_id = proto.Field(proto.STRING, number=2, oneof="revision",) - alias_name = proto.Field(proto.STRING, number=3, oneof="revision",) + repo_id = proto.Field( + proto.MESSAGE, + number=1, + message="RepoId", + ) + revision_id = proto.Field( + proto.STRING, + number=2, + oneof="revision", + ) + alias_name = proto.Field( + proto.STRING, + number=3, + oneof="revision", + ) alias_context = proto.Field( - proto.MESSAGE, number=4, oneof="revision", message="AliasContext", + proto.MESSAGE, + number=4, + oneof="revision", + message="AliasContext", ) @@ -166,8 +208,15 @@ class CloudWorkspaceSourceContext(proto.Message): most recent snapshot. """ - workspace_id = proto.Field(proto.MESSAGE, number=1, message="CloudWorkspaceId",) - snapshot_id = proto.Field(proto.STRING, number=2,) + workspace_id = proto.Field( + proto.MESSAGE, + number=1, + message="CloudWorkspaceId", + ) + snapshot_id = proto.Field( + proto.STRING, + number=2, + ) class GerritSourceContext(proto.Message): @@ -202,12 +251,29 @@ class GerritSourceContext(proto.Message): This field is a member of `oneof`_ ``revision``. """ - host_uri = proto.Field(proto.STRING, number=1,) - gerrit_project = proto.Field(proto.STRING, number=2,) - revision_id = proto.Field(proto.STRING, number=3, oneof="revision",) - alias_name = proto.Field(proto.STRING, number=4, oneof="revision",) + host_uri = proto.Field( + proto.STRING, + number=1, + ) + gerrit_project = proto.Field( + proto.STRING, + number=2, + ) + revision_id = proto.Field( + proto.STRING, + number=3, + oneof="revision", + ) + alias_name = proto.Field( + proto.STRING, + number=4, + oneof="revision", + ) alias_context = proto.Field( - proto.MESSAGE, number=5, oneof="revision", message="AliasContext", + proto.MESSAGE, + number=5, + oneof="revision", + message="AliasContext", ) @@ -223,8 +289,14 @@ class GitSourceContext(proto.Message): required. """ - url = proto.Field(proto.STRING, number=1,) - revision_id = proto.Field(proto.STRING, number=2,) + url = proto.Field( + proto.STRING, + number=1, + ) + revision_id = proto.Field( + proto.STRING, + number=2, + ) class RepoId(proto.Message): @@ -251,9 +323,16 @@ class RepoId(proto.Message): """ project_repo_id = proto.Field( - proto.MESSAGE, number=1, oneof="id", message="ProjectRepoId", + proto.MESSAGE, + number=1, + oneof="id", + message="ProjectRepoId", + ) + uid = proto.Field( + proto.STRING, + number=2, + oneof="id", ) - uid = proto.Field(proto.STRING, number=2, oneof="id",) class ProjectRepoId(proto.Message): @@ -268,8 +347,14 @@ class ProjectRepoId(proto.Message): default repo. """ - project_id = proto.Field(proto.STRING, number=1,) - repo_name = proto.Field(proto.STRING, number=2,) + project_id = proto.Field( + proto.STRING, + number=1, + ) + repo_name = proto.Field( + proto.STRING, + number=2, + ) class CloudWorkspaceId(proto.Message): @@ -286,8 +371,15 @@ class CloudWorkspaceId(proto.Message): the Source API's CreateWorkspace method. """ - repo_id = proto.Field(proto.MESSAGE, number=1, message="RepoId",) - name = proto.Field(proto.STRING, number=2,) + repo_id = proto.Field( + proto.MESSAGE, + number=1, + message="RepoId", + ) + name = proto.Field( + proto.STRING, + number=2, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-source-context/noxfile.py b/packages/google-cloud-source-context/noxfile.py index 2a2001c49998..3addb4ed9431 100644 --- a/packages/google-cloud-source-context/noxfile.py +++ b/packages/google-cloud-source-context/noxfile.py @@ -24,7 +24,7 @@ import nox -BLACK_VERSION = "black==19.10b0" +BLACK_VERSION = "black==22.3.0" BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] DEFAULT_PYTHON_VERSION = "3.8" @@ -57,7 +57,9 @@ def lint(session): """ session.install("flake8", BLACK_VERSION) session.run( - "black", "--check", *BLACK_PATHS, + "black", + "--check", + *BLACK_PATHS, ) session.run("flake8", "google", "tests") @@ -67,7 +69,8 @@ def blacken(session): """Run black. Format code to uniform standard.""" session.install(BLACK_VERSION) session.run( - "black", *BLACK_PATHS, + "black", + *BLACK_PATHS, )