From 96f3c62fbfd0a422d5448bfdda79f64f13d362ee Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 2 Jul 2020 10:26:29 -0700 Subject: [PATCH] chore: update templates, use new black (#29) --- packages/grafeas/docs/conf.py | 6 +- packages/grafeas/grafeas/grafeas.py | 6 +- .../grafeas/grafeas/grafeas_v1/__init__.py | 6 +- .../grafeas_v1/gapic/grafeas_client.py | 38 +- .../transports/grafeas_grpc_transport.py | 6 +- .../grafeas_v1/proto/attestation_pb2.py | 10 +- .../grafeas_v1/proto/attestation_pb2_grpc.py | 1 + .../grafeas/grafeas_v1/proto/build_pb2.py | 6 +- .../grafeas_v1/proto/build_pb2_grpc.py | 1 + .../grafeas/grafeas_v1/proto/common_pb2.py | 2 +- .../grafeas_v1/proto/common_pb2_grpc.py | 1 + .../grafeas/grafeas_v1/proto/cvss_pb2.py | 2 +- .../grafeas/grafeas_v1/proto/cvss_pb2_grpc.py | 1 + .../grafeas_v1/proto/deployment_pb2.py | 8 +- .../grafeas_v1/proto/deployment_pb2_grpc.py | 1 + .../grafeas/grafeas_v1/proto/discovery_pb2.py | 4 +- .../grafeas_v1/proto/discovery_pb2_grpc.py | 1 + .../grafeas/grafeas_v1/proto/grafeas_pb2.py | 22 +- .../grafeas_v1/proto/grafeas_pb2_grpc.py | 486 ++++++++++++++++-- .../grafeas/grafeas_v1/proto/image_pb2.py | 2 +- .../grafeas_v1/proto/image_pb2_grpc.py | 1 + .../grafeas/grafeas_v1/proto/package_pb2.py | 4 +- .../grafeas_v1/proto/package_pb2_grpc.py | 1 + .../grafeas_v1/proto/provenance_pb2.py | 22 +- .../grafeas_v1/proto/provenance_pb2_grpc.py | 1 + .../grafeas/grafeas_v1/proto/upgrade_pb2.py | 4 +- .../grafeas_v1/proto/upgrade_pb2_grpc.py | 1 + .../grafeas_v1/proto/vulnerability_pb2.py | 8 +- .../proto/vulnerability_pb2_grpc.py | 1 + packages/grafeas/grafeas/grafeas_v1/types.py | 8 +- packages/grafeas/noxfile.py | 12 +- packages/grafeas/synth.metadata | 4 +- 32 files changed, 532 insertions(+), 145 deletions(-) diff --git a/packages/grafeas/docs/conf.py b/packages/grafeas/docs/conf.py index 0a4008b5b8fb..26bd3f10a41c 100644 --- a/packages/grafeas/docs/conf.py +++ b/packages/grafeas/docs/conf.py @@ -255,7 +255,7 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, "grafeas.tex", u"grafeas Documentation", author, "manual",) + (master_doc, "grafeas.tex", u"grafeas Documentation", author, "manual") ] # The name of an image file (relative to this directory) to place at the top of @@ -283,7 +283,7 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [(master_doc, "grafeas", u"grafeas Documentation", [author], 1,)] +man_pages = [(master_doc, "grafeas", u"grafeas Documentation", [author], 1)] # If true, show URL addresses after external links. # man_show_urls = False @@ -323,7 +323,7 @@ intersphinx_mapping = { "python": ("http://python.readthedocs.org/en/latest/", None), "google-auth": ("https://google-auth.readthedocs.io/en/stable", 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.io/grpc/python/", None), } diff --git a/packages/grafeas/grafeas/grafeas.py b/packages/grafeas/grafeas/grafeas.py index be586f6cfd64..b95539b4741c 100644 --- a/packages/grafeas/grafeas/grafeas.py +++ b/packages/grafeas/grafeas/grafeas.py @@ -22,8 +22,4 @@ from grafeas.grafeas_v1 import types -__all__ = ( - "enums", - "types", - "GrafeasClient", -) +__all__ = ("enums", "types", "GrafeasClient") diff --git a/packages/grafeas/grafeas/grafeas_v1/__init__.py b/packages/grafeas/grafeas/grafeas_v1/__init__.py index 2d0a0d57988a..81b69ba1ef40 100644 --- a/packages/grafeas/grafeas/grafeas_v1/__init__.py +++ b/packages/grafeas/grafeas/grafeas_v1/__init__.py @@ -38,8 +38,4 @@ class GrafeasClient(grafeas_client.GrafeasClient): enums = enums -__all__ = ( - "enums", - "types", - "GrafeasClient", -) +__all__ = ("enums", "types", "GrafeasClient") diff --git a/packages/grafeas/grafeas/grafeas_v1/gapic/grafeas_client.py b/packages/grafeas/grafeas/grafeas_v1/gapic/grafeas_client.py index 5c25bdd275ba..836f39137db4 100644 --- a/packages/grafeas/grafeas/grafeas_v1/gapic/grafeas_client.py +++ b/packages/grafeas/grafeas/grafeas_v1/gapic/grafeas_client.py @@ -39,7 +39,7 @@ from grafeas.grafeas_v1.proto import grafeas_pb2_grpc -_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("grafeas",).version +_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("grafeas").version class GrafeasClient(object): @@ -69,7 +69,7 @@ class GrafeasClient(object): def note_path(cls, project, note): """Return a fully-qualified note string.""" return google.api_core.path_template.expand( - "projects/{project}/notes/{note}", project=project, note=note, + "projects/{project}/notes/{note}", project=project, note=note ) @classmethod @@ -85,7 +85,7 @@ def occurrence_path(cls, project, occurrence): def project_path(cls, project): """Return a fully-qualified project string.""" return google.api_core.path_template.expand( - "projects/{project}", project=project, + "projects/{project}", project=project ) def __init__(self, transport, client_config=None, client_info=None): @@ -125,7 +125,7 @@ def __init__(self, transport, client_config=None, client_info=None): if client_info is None: client_info = google.api_core.gapic_v1.client_info.ClientInfo( - gapic_version=_GAPIC_LIBRARY_VERSION, + gapic_version=_GAPIC_LIBRARY_VERSION ) else: client_info.gapic_version = _GAPIC_LIBRARY_VERSION @@ -136,7 +136,7 @@ def __init__(self, transport, client_config=None, client_info=None): # (Ordinarily, these are the defaults specified in the `*_config.py` # file next to this one.) self._method_configs = google.api_core.gapic_v1.config.parse_method_configs( - client_config["interfaces"][self._INTERFACE_NAME], + client_config["interfaces"][self._INTERFACE_NAME] ) # Save a dictionary of cached API call functions. @@ -202,7 +202,7 @@ def get_occurrence( client_info=self._client_info, ) - request = grafeas_pb2.GetOccurrenceRequest(name=name,) + request = grafeas_pb2.GetOccurrenceRequest(name=name) if metadata is None: metadata = [] metadata = list(metadata) @@ -300,7 +300,7 @@ def list_occurrences( ) request = grafeas_pb2.ListOccurrencesRequest( - parent=parent, filter=filter_, page_size=page_size, + parent=parent, filter=filter_, page_size=page_size ) if metadata is None: metadata = [] @@ -385,7 +385,7 @@ def delete_occurrence( client_info=self._client_info, ) - request = grafeas_pb2.DeleteOccurrenceRequest(name=name,) + request = grafeas_pb2.DeleteOccurrenceRequest(name=name) if metadata is None: metadata = [] metadata = list(metadata) @@ -468,7 +468,7 @@ def create_occurrence( ) request = grafeas_pb2.CreateOccurrenceRequest( - parent=parent, occurrence=occurrence, + parent=parent, occurrence=occurrence ) if metadata is None: metadata = [] @@ -552,7 +552,7 @@ def batch_create_occurrences( ) request = grafeas_pb2.BatchCreateOccurrencesRequest( - parent=parent, occurrences=occurrences, + parent=parent, occurrences=occurrences ) if metadata is None: metadata = [] @@ -641,7 +641,7 @@ def update_occurrence( ) request = grafeas_pb2.UpdateOccurrenceRequest( - name=name, occurrence=occurrence, update_mask=update_mask, + name=name, occurrence=occurrence, update_mask=update_mask ) if metadata is None: metadata = [] @@ -717,7 +717,7 @@ def get_occurrence_note( client_info=self._client_info, ) - request = grafeas_pb2.GetOccurrenceNoteRequest(name=name,) + request = grafeas_pb2.GetOccurrenceNoteRequest(name=name) if metadata is None: metadata = [] metadata = list(metadata) @@ -791,7 +791,7 @@ def get_note( client_info=self._client_info, ) - request = grafeas_pb2.GetNoteRequest(name=name,) + request = grafeas_pb2.GetNoteRequest(name=name) if metadata is None: metadata = [] metadata = list(metadata) @@ -889,7 +889,7 @@ def list_notes( ) request = grafeas_pb2.ListNotesRequest( - parent=parent, filter=filter_, page_size=page_size, + parent=parent, filter=filter_, page_size=page_size ) if metadata is None: metadata = [] @@ -972,7 +972,7 @@ def delete_note( client_info=self._client_info, ) - request = grafeas_pb2.DeleteNoteRequest(name=name,) + request = grafeas_pb2.DeleteNoteRequest(name=name) if metadata is None: metadata = [] metadata = list(metadata) @@ -1060,7 +1060,7 @@ def create_note( ) request = grafeas_pb2.CreateNoteRequest( - parent=parent, note_id=note_id, note=note, + parent=parent, note_id=note_id, note=note ) if metadata is None: metadata = [] @@ -1143,7 +1143,7 @@ def batch_create_notes( client_info=self._client_info, ) - request = grafeas_pb2.BatchCreateNotesRequest(parent=parent, notes=notes,) + request = grafeas_pb2.BatchCreateNotesRequest(parent=parent, notes=notes) if metadata is None: metadata = [] metadata = list(metadata) @@ -1231,7 +1231,7 @@ def update_note( ) request = grafeas_pb2.UpdateNoteRequest( - name=name, note=note, update_mask=update_mask, + name=name, note=note, update_mask=update_mask ) if metadata is None: metadata = [] @@ -1332,7 +1332,7 @@ def list_note_occurrences( ) request = grafeas_pb2.ListNoteOccurrencesRequest( - name=name, filter=filter_, page_size=page_size, + name=name, filter=filter_, page_size=page_size ) if metadata is None: metadata = [] diff --git a/packages/grafeas/grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py b/packages/grafeas/grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py index 8a630ead26aa..e437a5888cd9 100644 --- a/packages/grafeas/grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py +++ b/packages/grafeas/grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py @@ -49,7 +49,7 @@ def __init__(self, address, scopes, channel=None, credentials=None): # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - "The `channel` and `credentials` arguments are mutually " "exclusive.", + "The `channel` and `credentials` arguments are mutually " "exclusive." ) # Create the channel. @@ -68,9 +68,7 @@ def __init__(self, address, scopes, channel=None, credentials=None): # gRPC uses objects called "stubs" that are bound to the # channel and provide a basic method for each RPC. - self._stubs = { - "grafeas_stub": grafeas_pb2_grpc.GrafeasStub(channel), - } + self._stubs = {"grafeas_stub": grafeas_pb2_grpc.GrafeasStub(channel)} @classmethod def create_channel(cls, address, scopes, credentials=None, **kwargs): diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/attestation_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/attestation_pb2.py index 5606d9e711e6..b1af872de98a 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/attestation_pb2.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/attestation_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: grafeas/grafeas_v1/proto/attestation.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -24,7 +24,7 @@ serialized_options=b"\n\rio.grafeas.v1P\001ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\242\002\003GRA", create_key=_descriptor._internal_create_key, serialized_pb=b'\n*grafeas/grafeas_v1/proto/attestation.proto\x12\ngrafeas.v1\x1a%grafeas/grafeas_v1/proto/common.proto"f\n\x0f\x41ttestationNote\x12.\n\x04hint\x18\x01 \x01(\x0b\x32 .grafeas.v1.AttestationNote.Hint\x1a#\n\x04Hint\x12\x1b\n\x13human_readable_name\x18\x01 \x01(\t"^\n\x15\x41ttestationOccurrence\x12\x1a\n\x12serialized_payload\x18\x01 \x01(\x0c\x12)\n\nsignatures\x18\x02 \x03(\x0b\x32\x15.grafeas.v1.SignatureB_\n\rio.grafeas.v1P\x01ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\xa2\x02\x03GRAb\x06proto3', - dependencies=[grafeas_dot_grafeas__v1_dot_proto_dot_common__pb2.DESCRIPTOR,], + dependencies=[grafeas_dot_grafeas__v1_dot_proto_dot_common__pb2.DESCRIPTOR], ) @@ -54,7 +54,7 @@ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, - ), + ) ], extensions=[], nested_types=[], @@ -94,10 +94,10 @@ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, - ), + ) ], extensions=[], - nested_types=[_ATTESTATIONNOTE_HINT,], + nested_types=[_ATTESTATIONNOTE_HINT], enum_types=[], serialized_options=None, is_extendable=False, diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/attestation_pb2_grpc.py b/packages/grafeas/grafeas/grafeas_v1/proto/attestation_pb2_grpc.py index 07cb78fe03a9..8a9393943bdf 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/attestation_pb2_grpc.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/attestation_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/build_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/build_pb2.py index a92ff932c792..d93f996d3c09 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/build_pb2.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/build_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: grafeas/grafeas_v1/proto/build.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -24,7 +24,7 @@ serialized_options=b"\n\rio.grafeas.v1P\001ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\242\002\003GRA", create_key=_descriptor._internal_create_key, serialized_pb=b'\n$grafeas/grafeas_v1/proto/build.proto\x12\ngrafeas.v1\x1a)grafeas/grafeas_v1/proto/provenance.proto"$\n\tBuildNote\x12\x17\n\x0f\x62uilder_version\x18\x01 \x01(\t"\\\n\x0f\x42uildOccurrence\x12/\n\nprovenance\x18\x01 \x01(\x0b\x32\x1b.grafeas.v1.BuildProvenance\x12\x18\n\x10provenance_bytes\x18\x02 \x01(\tB_\n\rio.grafeas.v1P\x01ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\xa2\x02\x03GRAb\x06proto3', - dependencies=[grafeas_dot_grafeas__v1_dot_proto_dot_provenance__pb2.DESCRIPTOR,], + dependencies=[grafeas_dot_grafeas__v1_dot_proto_dot_provenance__pb2.DESCRIPTOR], ) @@ -54,7 +54,7 @@ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, - ), + ) ], extensions=[], nested_types=[], diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/build_pb2_grpc.py b/packages/grafeas/grafeas/grafeas_v1/proto/build_pb2_grpc.py index 07cb78fe03a9..8a9393943bdf 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/build_pb2_grpc.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/build_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/common_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/common_pb2.py index c53a61b9f9ed..207e6f95e3a2 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/common_pb2.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/common_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: grafeas/grafeas_v1/proto/common.proto - +"""Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/common_pb2_grpc.py b/packages/grafeas/grafeas/grafeas_v1/proto/common_pb2_grpc.py index 07cb78fe03a9..8a9393943bdf 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/common_pb2_grpc.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/common_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/cvss_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/cvss_pb2.py index f4fd1d182e40..718116bde60c 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/cvss_pb2.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/cvss_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: grafeas/grafeas_v1/proto/cvss.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/cvss_pb2_grpc.py b/packages/grafeas/grafeas/grafeas_v1/proto/cvss_pb2_grpc.py index 07cb78fe03a9..8a9393943bdf 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/cvss_pb2_grpc.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/cvss_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/deployment_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/deployment_pb2.py index 342bf864790f..95f6d5bc6535 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/deployment_pb2.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/deployment_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: grafeas/grafeas_v1/proto/deployment.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -22,7 +22,7 @@ serialized_options=b"\n\rio.grafeas.v1P\001ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\242\002\003GRA", create_key=_descriptor._internal_create_key, serialized_pb=b'\n)grafeas/grafeas_v1/proto/deployment.proto\x12\ngrafeas.v1\x1a\x1fgoogle/protobuf/timestamp.proto"&\n\x0e\x44\x65ploymentNote\x12\x14\n\x0cresource_uri\x18\x01 \x03(\t"\xc7\x02\n\x14\x44\x65ploymentOccurrence\x12\x12\n\nuser_email\x18\x01 \x01(\t\x12/\n\x0b\x64\x65ploy_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rundeploy_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06\x63onfig\x18\x04 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x05 \x01(\t\x12\x14\n\x0cresource_uri\x18\x06 \x03(\t\x12;\n\x08platform\x18\x07 \x01(\x0e\x32).grafeas.v1.DeploymentOccurrence.Platform"C\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x07\n\x03GKE\x10\x01\x12\x08\n\x04\x46LEX\x10\x02\x12\n\n\x06\x43USTOM\x10\x03\x42_\n\rio.grafeas.v1P\x01ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\xa2\x02\x03GRAb\x06proto3', - dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,], + dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR], ) @@ -100,7 +100,7 @@ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, - ), + ) ], extensions=[], nested_types=[], @@ -259,7 +259,7 @@ ], extensions=[], nested_types=[], - enum_types=[_DEPLOYMENTOCCURRENCE_PLATFORM,], + enum_types=[_DEPLOYMENTOCCURRENCE_PLATFORM], serialized_options=None, is_extendable=False, syntax="proto3", diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/deployment_pb2_grpc.py b/packages/grafeas/grafeas/grafeas_v1/proto/deployment_pb2_grpc.py index 07cb78fe03a9..8a9393943bdf 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/deployment_pb2_grpc.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/deployment_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/discovery_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/discovery_pb2.py index 68f18d404c5d..f25b61a1872b 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/discovery_pb2.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/discovery_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: grafeas/grafeas_v1/proto/discovery.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -163,7 +163,7 @@ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, - ), + ) ], extensions=[], nested_types=[], diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/discovery_pb2_grpc.py b/packages/grafeas/grafeas/grafeas_v1/proto/discovery_pb2_grpc.py index 07cb78fe03a9..8a9393943bdf 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/discovery_pb2_grpc.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/discovery_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/grafeas_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/grafeas_pb2.py index 5a855a11c3ae..04e3f4d725f8 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/grafeas_pb2.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/grafeas_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: grafeas/grafeas_v1/proto/grafeas.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -385,7 +385,7 @@ containing_type=None, create_key=_descriptor._internal_create_key, fields=[], - ), + ) ], serialized_start=636, serialized_end=1364, @@ -739,7 +739,7 @@ containing_type=None, create_key=_descriptor._internal_create_key, fields=[], - ), + ) ], serialized_start=1367, serialized_end=2137, @@ -772,7 +772,7 @@ serialized_options=b"\340A\002\372A\027\n\025grafeas.io/Occurrence", file=DESCRIPTOR, create_key=_descriptor._internal_create_key, - ), + ) ], extensions=[], nested_types=[], @@ -971,7 +971,7 @@ serialized_options=b"\340A\002\372A\027\n\025grafeas.io/Occurrence", file=DESCRIPTOR, create_key=_descriptor._internal_create_key, - ), + ) ], extensions=[], nested_types=[], @@ -1151,7 +1151,7 @@ serialized_options=b"\340A\002\372A\021\n\017grafeas.io/Note", file=DESCRIPTOR, create_key=_descriptor._internal_create_key, - ), + ) ], extensions=[], nested_types=[], @@ -1192,7 +1192,7 @@ serialized_options=b"\340A\002\372A\027\n\025grafeas.io/Occurrence", file=DESCRIPTOR, create_key=_descriptor._internal_create_key, - ), + ) ], extensions=[], nested_types=[], @@ -1391,7 +1391,7 @@ serialized_options=b"\340A\002\372A\021\n\017grafeas.io/Note", file=DESCRIPTOR, create_key=_descriptor._internal_create_key, - ), + ) ], extensions=[], nested_types=[], @@ -1829,7 +1829,7 @@ ), ], extensions=[], - nested_types=[_BATCHCREATENOTESREQUEST_NOTESENTRY,], + nested_types=[_BATCHCREATENOTESREQUEST_NOTESENTRY], enum_types=[], serialized_options=None, is_extendable=False, @@ -1867,7 +1867,7 @@ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, - ), + ) ], extensions=[], nested_types=[], @@ -1968,7 +1968,7 @@ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, - ), + ) ], extensions=[], nested_types=[], diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/grafeas_pb2_grpc.py b/packages/grafeas/grafeas/grafeas_v1/proto/grafeas_pb2_grpc.py index 02d45a656f29..1a65a40b1871 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/grafeas_pb2_grpc.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/grafeas_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 @@ -10,26 +11,26 @@ class GrafeasStub(object): """[Grafeas](https://grafeas.io) API. - Retrieves analysis results of Cloud components such as Docker container - images. + Retrieves analysis results of Cloud components such as Docker container + images. - Analysis results are stored as a series of occurrences. An `Occurrence` - contains information about a specific analysis instance on a resource. An - occurrence refers to a `Note`. A note contains details describing the - analysis and is generally stored in a separate project, called a `Provider`. - Multiple occurrences can refer to the same note. + Analysis results are stored as a series of occurrences. An `Occurrence` + contains information about a specific analysis instance on a resource. An + occurrence refers to a `Note`. A note contains details describing the + analysis and is generally stored in a separate project, called a `Provider`. + Multiple occurrences can refer to the same note. - For example, an SSL vulnerability could affect multiple images. In this case, - there would be one note for the vulnerability and an occurrence for each - image with the vulnerability referring to that note. - """ + For example, an SSL vulnerability could affect multiple images. In this case, + there would be one note for the vulnerability and an occurrence for each + image with the vulnerability referring to that note. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.GetOccurrence = channel.unary_unary( "/grafeas.v1.Grafeas/GetOccurrence", request_serializer=grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.GetOccurrenceRequest.SerializeToString, @@ -105,119 +106,119 @@ def __init__(self, channel): class GrafeasServicer(object): """[Grafeas](https://grafeas.io) API. - Retrieves analysis results of Cloud components such as Docker container - images. + Retrieves analysis results of Cloud components such as Docker container + images. - Analysis results are stored as a series of occurrences. An `Occurrence` - contains information about a specific analysis instance on a resource. An - occurrence refers to a `Note`. A note contains details describing the - analysis and is generally stored in a separate project, called a `Provider`. - Multiple occurrences can refer to the same note. + Analysis results are stored as a series of occurrences. An `Occurrence` + contains information about a specific analysis instance on a resource. An + occurrence refers to a `Note`. A note contains details describing the + analysis and is generally stored in a separate project, called a `Provider`. + Multiple occurrences can refer to the same note. - For example, an SSL vulnerability could affect multiple images. In this case, - there would be one note for the vulnerability and an occurrence for each - image with the vulnerability referring to that note. - """ + For example, an SSL vulnerability could affect multiple images. In this case, + there would be one note for the vulnerability and an occurrence for each + image with the vulnerability referring to that note. + """ def GetOccurrence(self, request, context): """Gets the specified occurrence. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListOccurrences(self, request, context): """Lists occurrences for the specified project. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteOccurrence(self, request, context): """Deletes the specified occurrence. For example, use this method to delete an - occurrence when the occurrence is no longer applicable for the given - resource. - """ + occurrence when the occurrence is no longer applicable for the given + resource. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def CreateOccurrence(self, request, context): """Creates a new occurrence. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def BatchCreateOccurrences(self, request, context): """Creates new occurrences in batch. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateOccurrence(self, request, context): """Updates the specified occurrence. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetOccurrenceNote(self, request, context): """Gets the note attached to the specified occurrence. Consumer projects can - use this method to get a note that belongs to a provider project. - """ + use this method to get a note that belongs to a provider project. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetNote(self, request, context): """Gets the specified note. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListNotes(self, request, context): """Lists notes for the specified project. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteNote(self, request, context): """Deletes the specified note. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def CreateNote(self, request, context): """Creates a new note. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def BatchCreateNotes(self, request, context): """Creates new notes in batch. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateNote(self, request, context): """Updates the specified note. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListNoteOccurrences(self, request, context): """Lists occurrences referencing the specified note. Provider projects can use - this method to get all occurrences across consumer projects referencing the - specified note. - """ + this method to get all occurrences across consumer projects referencing the + specified note. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -300,3 +301,400 @@ def add_GrafeasServicer_to_server(servicer, server): "grafeas.v1.Grafeas", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class Grafeas(object): + """[Grafeas](https://grafeas.io) API. + + Retrieves analysis results of Cloud components such as Docker container + images. + + Analysis results are stored as a series of occurrences. An `Occurrence` + contains information about a specific analysis instance on a resource. An + occurrence refers to a `Note`. A note contains details describing the + analysis and is generally stored in a separate project, called a `Provider`. + Multiple occurrences can refer to the same note. + + For example, an SSL vulnerability could affect multiple images. In this case, + there would be one note for the vulnerability and an occurrence for each + image with the vulnerability referring to that note. + """ + + @staticmethod + def GetOccurrence( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/grafeas.v1.Grafeas/GetOccurrence", + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.GetOccurrenceRequest.SerializeToString, + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.Occurrence.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListOccurrences( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/grafeas.v1.Grafeas/ListOccurrences", + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.ListOccurrencesRequest.SerializeToString, + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.ListOccurrencesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteOccurrence( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/grafeas.v1.Grafeas/DeleteOccurrence", + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.DeleteOccurrenceRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateOccurrence( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/grafeas.v1.Grafeas/CreateOccurrence", + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.CreateOccurrenceRequest.SerializeToString, + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.Occurrence.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def BatchCreateOccurrences( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/grafeas.v1.Grafeas/BatchCreateOccurrences", + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.BatchCreateOccurrencesRequest.SerializeToString, + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.BatchCreateOccurrencesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateOccurrence( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/grafeas.v1.Grafeas/UpdateOccurrence", + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.UpdateOccurrenceRequest.SerializeToString, + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.Occurrence.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetOccurrenceNote( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/grafeas.v1.Grafeas/GetOccurrenceNote", + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.GetOccurrenceNoteRequest.SerializeToString, + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.Note.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetNote( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/grafeas.v1.Grafeas/GetNote", + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.GetNoteRequest.SerializeToString, + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.Note.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListNotes( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/grafeas.v1.Grafeas/ListNotes", + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.ListNotesRequest.SerializeToString, + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.ListNotesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteNote( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/grafeas.v1.Grafeas/DeleteNote", + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.DeleteNoteRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateNote( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/grafeas.v1.Grafeas/CreateNote", + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.CreateNoteRequest.SerializeToString, + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.Note.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def BatchCreateNotes( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/grafeas.v1.Grafeas/BatchCreateNotes", + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.BatchCreateNotesRequest.SerializeToString, + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.BatchCreateNotesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateNote( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/grafeas.v1.Grafeas/UpdateNote", + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.UpdateNoteRequest.SerializeToString, + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.Note.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListNoteOccurrences( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/grafeas.v1.Grafeas/ListNoteOccurrences", + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.ListNoteOccurrencesRequest.SerializeToString, + grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.ListNoteOccurrencesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/image_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/image_pb2.py index c13a20a04fc0..754c66eff210 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/image_pb2.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/image_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: grafeas/grafeas_v1/proto/image.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/image_pb2_grpc.py b/packages/grafeas/grafeas/grafeas_v1/proto/image_pb2_grpc.py index 07cb78fe03a9..8a9393943bdf 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/image_pb2_grpc.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/image_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/package_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/package_pb2.py index a3a564037fda..5c50120d7e07 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/package_pb2.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/package_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: grafeas/grafeas_v1/proto/package.proto - +"""Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -556,7 +556,7 @@ ], extensions=[], nested_types=[], - enum_types=[_VERSION_VERSIONKIND,], + enum_types=[_VERSION_VERSIONKIND], serialized_options=None, is_extendable=False, syntax="proto3", diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/package_pb2_grpc.py b/packages/grafeas/grafeas/grafeas_v1/proto/package_pb2_grpc.py index 07cb78fe03a9..8a9393943bdf 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/package_pb2_grpc.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/package_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/provenance_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/provenance_pb2.py index 35f3f88095bc..6ae452a0b1a0 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/provenance_pb2.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/provenance_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: grafeas/grafeas_v1/proto/provenance.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -22,7 +22,7 @@ serialized_options=b"\n\rio.grafeas.v1P\001ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\242\002\003GRA", create_key=_descriptor._internal_create_key, serialized_pb=b'\n)grafeas/grafeas_v1/proto/provenance.proto\x12\ngrafeas.v1\x1a\x1fgoogle/protobuf/timestamp.proto"\x90\x04\n\x0f\x42uildProvenance\x12\n\n\x02id\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12%\n\x08\x63ommands\x18\x03 \x03(\x0b\x32\x13.grafeas.v1.Command\x12-\n\x0f\x62uilt_artifacts\x18\x04 \x03(\x0b\x32\x14.grafeas.v1.Artifact\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x63reator\x18\x08 \x01(\t\x12\x10\n\x08logs_uri\x18\t \x01(\t\x12-\n\x11source_provenance\x18\n \x01(\x0b\x32\x12.grafeas.v1.Source\x12\x12\n\ntrigger_id\x18\x0b \x01(\t\x12\x44\n\rbuild_options\x18\x0c \x03(\x0b\x32-.grafeas.v1.BuildProvenance.BuildOptionsEntry\x12\x17\n\x0f\x62uilder_version\x18\r \x01(\t\x1a\x33\n\x11\x42uildOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x95\x02\n\x06Source\x12#\n\x1b\x61rtifact_storage_source_uri\x18\x01 \x01(\t\x12\x37\n\x0b\x66ile_hashes\x18\x02 \x03(\x0b\x32".grafeas.v1.Source.FileHashesEntry\x12*\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x19.grafeas.v1.SourceContext\x12\x36\n\x13\x61\x64\x64itional_contexts\x18\x04 \x03(\x0b\x32\x19.grafeas.v1.SourceContext\x1aI\n\x0f\x46ileHashesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.grafeas.v1.FileHashes:\x02\x38\x01"1\n\nFileHashes\x12#\n\tfile_hash\x18\x01 \x03(\x0b\x32\x10.grafeas.v1.Hash"#\n\x04Hash\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c"]\n\x07\x43ommand\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03\x65nv\x18\x02 \x03(\t\x12\x0c\n\x04\x61rgs\x18\x03 \x03(\t\x12\x0b\n\x03\x64ir\x18\x04 \x01(\t\x12\n\n\x02id\x18\x05 \x01(\t\x12\x10\n\x08wait_for\x18\x06 \x03(\t"7\n\x08\x41rtifact\x12\x10\n\x08\x63hecksum\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\r\n\x05names\x18\x03 \x03(\t"\x9a\x02\n\rSourceContext\x12\x38\n\ncloud_repo\x18\x01 \x01(\x0b\x32".grafeas.v1.CloudRepoSourceContextH\x00\x12\x31\n\x06gerrit\x18\x02 \x01(\x0b\x32\x1f.grafeas.v1.GerritSourceContextH\x00\x12+\n\x03git\x18\x03 \x01(\x0b\x32\x1c.grafeas.v1.GitSourceContextH\x00\x12\x35\n\x06labels\x18\x04 \x03(\x0b\x32%.grafeas.v1.SourceContext.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07\x63ontext"\x8a\x01\n\x0c\x41liasContext\x12+\n\x04kind\x18\x01 \x01(\x0e\x32\x1d.grafeas.v1.AliasContext.Kind\x12\x0c\n\x04name\x18\x02 \x01(\t"?\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\t\n\x05\x46IXED\x10\x01\x12\x0b\n\x07MOVABLE\x10\x02\x12\t\n\x05OTHER\x10\x04"\x93\x01\n\x16\x43loudRepoSourceContext\x12#\n\x07repo_id\x18\x01 \x01(\x0b\x32\x12.grafeas.v1.RepoId\x12\x15\n\x0brevision_id\x18\x02 \x01(\tH\x00\x12\x31\n\ralias_context\x18\x03 \x01(\x0b\x32\x18.grafeas.v1.AliasContextH\x00\x42\n\n\x08revision"\x95\x01\n\x13GerritSourceContext\x12\x10\n\x08host_uri\x18\x01 \x01(\t\x12\x16\n\x0egerrit_project\x18\x02 \x01(\t\x12\x15\n\x0brevision_id\x18\x03 \x01(\tH\x00\x12\x31\n\ralias_context\x18\x04 \x01(\x0b\x32\x18.grafeas.v1.AliasContextH\x00\x42\n\n\x08revision"4\n\x10GitSourceContext\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x13\n\x0brevision_id\x18\x02 \x01(\t"S\n\x06RepoId\x12\x34\n\x0fproject_repo_id\x18\x01 \x01(\x0b\x32\x19.grafeas.v1.ProjectRepoIdH\x00\x12\r\n\x03uid\x18\x02 \x01(\tH\x00\x42\x04\n\x02id"6\n\rProjectRepoId\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x11\n\trepo_name\x18\x02 \x01(\tB_\n\rio.grafeas.v1P\x01ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\xa2\x02\x03GRAb\x06proto3', - dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,], + dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR], ) @@ -390,7 +390,7 @@ ), ], extensions=[], - nested_types=[_BUILDPROVENANCE_BUILDOPTIONSENTRY,], + nested_types=[_BUILDPROVENANCE_BUILDOPTIONSENTRY], enum_types=[], serialized_options=None, is_extendable=False, @@ -547,7 +547,7 @@ ), ], extensions=[], - nested_types=[_SOURCE_FILEHASHESENTRY,], + nested_types=[_SOURCE_FILEHASHESENTRY], enum_types=[], serialized_options=None, is_extendable=False, @@ -585,7 +585,7 @@ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, - ), + ) ], extensions=[], nested_types=[], @@ -1020,7 +1020,7 @@ ), ], extensions=[], - nested_types=[_SOURCECONTEXT_LABELSENTRY,], + nested_types=[_SOURCECONTEXT_LABELSENTRY], enum_types=[], serialized_options=None, is_extendable=False, @@ -1034,7 +1034,7 @@ containing_type=None, create_key=_descriptor._internal_create_key, fields=[], - ), + ) ], serialized_start=1142, serialized_end=1424, @@ -1090,7 +1090,7 @@ ], extensions=[], nested_types=[], - enum_types=[_ALIASCONTEXT_KIND,], + enum_types=[_ALIASCONTEXT_KIND], serialized_options=None, is_extendable=False, syntax="proto3", @@ -1182,7 +1182,7 @@ containing_type=None, create_key=_descriptor._internal_create_key, fields=[], - ), + ) ], serialized_start=1568, serialized_end=1715, @@ -1289,7 +1289,7 @@ containing_type=None, create_key=_descriptor._internal_create_key, fields=[], - ), + ) ], serialized_start=1718, serialized_end=1867, @@ -1418,7 +1418,7 @@ containing_type=None, create_key=_descriptor._internal_create_key, fields=[], - ), + ) ], serialized_start=1923, serialized_end=2006, diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/provenance_pb2_grpc.py b/packages/grafeas/grafeas/grafeas_v1/proto/provenance_pb2_grpc.py index 07cb78fe03a9..8a9393943bdf 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/provenance_pb2_grpc.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/provenance_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/upgrade_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/upgrade_pb2.py index 9d7ed0116e68..5362521da504 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/upgrade_pb2.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/upgrade_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: grafeas/grafeas_v1/proto/upgrade.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -489,7 +489,7 @@ ), ], extensions=[], - nested_types=[_WINDOWSUPDATE_IDENTITY, _WINDOWSUPDATE_CATEGORY,], + nested_types=[_WINDOWSUPDATE_IDENTITY, _WINDOWSUPDATE_CATEGORY], enum_types=[], serialized_options=None, is_extendable=False, diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/upgrade_pb2_grpc.py b/packages/grafeas/grafeas/grafeas_v1/proto/upgrade_pb2_grpc.py index 07cb78fe03a9..8a9393943bdf 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/upgrade_pb2_grpc.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/upgrade_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/vulnerability_pb2.py b/packages/grafeas/grafeas/grafeas_v1/proto/vulnerability_pb2.py index 03199dab2d4a..d99b4a127ab6 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/vulnerability_pb2.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/vulnerability_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: grafeas/grafeas_v1/proto/vulnerability.proto - +"""Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -506,7 +506,7 @@ ), ], extensions=[], - nested_types=[_VULNERABILITYNOTE_WINDOWSDETAIL_KNOWLEDGEBASE,], + nested_types=[_VULNERABILITYNOTE_WINDOWSDETAIL_KNOWLEDGEBASE], enum_types=[], serialized_options=None, is_extendable=False, @@ -641,7 +641,7 @@ ), ], extensions=[], - nested_types=[_VULNERABILITYNOTE_DETAIL, _VULNERABILITYNOTE_WINDOWSDETAIL,], + nested_types=[_VULNERABILITYNOTE_DETAIL, _VULNERABILITYNOTE_WINDOWSDETAIL], enum_types=[], serialized_options=None, is_extendable=False, @@ -988,7 +988,7 @@ ), ], extensions=[], - nested_types=[_VULNERABILITYOCCURRENCE_PACKAGEISSUE,], + nested_types=[_VULNERABILITYOCCURRENCE_PACKAGEISSUE], enum_types=[], serialized_options=None, is_extendable=False, diff --git a/packages/grafeas/grafeas/grafeas_v1/proto/vulnerability_pb2_grpc.py b/packages/grafeas/grafeas/grafeas_v1/proto/vulnerability_pb2_grpc.py index 07cb78fe03a9..8a9393943bdf 100644 --- a/packages/grafeas/grafeas/grafeas_v1/proto/vulnerability_pb2_grpc.py +++ b/packages/grafeas/grafeas/grafeas_v1/proto/vulnerability_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/packages/grafeas/grafeas/grafeas_v1/types.py b/packages/grafeas/grafeas/grafeas_v1/types.py index 9d65a986fea5..5d0c64cf21d4 100644 --- a/packages/grafeas/grafeas/grafeas_v1/types.py +++ b/packages/grafeas/grafeas/grafeas_v1/types.py @@ -39,13 +39,7 @@ from grafeas.grafeas_v1.proto import vulnerability_pb2 -_shared_modules = [ - any_pb2, - empty_pb2, - field_mask_pb2, - timestamp_pb2, - status_pb2, -] +_shared_modules = [any_pb2, empty_pb2, field_mask_pb2, timestamp_pb2, status_pb2] _local_modules = [ attestation_pb2, diff --git a/packages/grafeas/noxfile.py b/packages/grafeas/noxfile.py index 4cccb7aab04f..2024427e1661 100644 --- a/packages/grafeas/noxfile.py +++ b/packages/grafeas/noxfile.py @@ -39,9 +39,7 @@ def lint(session): serious code quality issues. """ session.install("flake8", BLACK_VERSION) - session.run( - "black", "--check", *BLACK_PATHS, - ) + session.run("black", "--check", *BLACK_PATHS) session.run("flake8", "grafeas", "tests") @@ -56,9 +54,7 @@ def blacken(session): check the state of the `gcp_ubuntu_config` we use for that Kokoro run. """ session.install(BLACK_VERSION) - session.run( - "black", *BLACK_PATHS, - ) + session.run("black", *BLACK_PATHS) @nox.session(python=DEFAULT_PYTHON_VERSION) @@ -114,9 +110,7 @@ def system(session): # Install all test dependencies, then install this package into the # virtualenv's dist-packages. - session.install( - "mock", "pytest", "google-cloud-testutils", - ) + session.install("mock", "pytest", "google-cloud-testutils") session.install("-e", ".") # Run py.test against the system tests. diff --git a/packages/grafeas/synth.metadata b/packages/grafeas/synth.metadata index ddcd88de2c46..a4d257819fb0 100644 --- a/packages/grafeas/synth.metadata +++ b/packages/grafeas/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "79a17b8c64efa7bafff0a16b467754c73d570b6e", - "internalRef": "317385359" + "sha": "b882b8e6bfcd708042ff00f7adc67ce750817dd0", + "internalRef": "318028816" } }, {