diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a3da1b0..dd98abb 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:3e3800bb100af5d7f9e810d48212b37812c1856d20ffeafb99ebe66461b61fc7 -# created: 2023-08-02T10:53:29.114535628Z + digest: sha256:08e34975760f002746b1d8c86fdc90660be45945ee6d9db914d1508acdf9a547 +# created: 2023-10-09T14:06:13.397766266Z diff --git a/.gitignore b/.gitignore index b4243ce..d083ea1 100644 --- a/.gitignore +++ b/.gitignore @@ -50,6 +50,7 @@ docs.metadata # Virtual environment env/ +venv/ # Test logs coverage.xml diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index 029bd34..0332d32 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -113,30 +113,30 @@ commonmark==0.9.1 \ --hash=sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60 \ --hash=sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9 # via rich -cryptography==41.0.3 \ - --hash=sha256:0d09fb5356f975974dbcb595ad2d178305e5050656affb7890a1583f5e02a306 \ - --hash=sha256:23c2d778cf829f7d0ae180600b17e9fceea3c2ef8b31a99e3c694cbbf3a24b84 \ - --hash=sha256:3fb248989b6363906827284cd20cca63bb1a757e0a2864d4c1682a985e3dca47 \ - --hash=sha256:41d7aa7cdfded09b3d73a47f429c298e80796c8e825ddfadc84c8a7f12df212d \ - --hash=sha256:42cb413e01a5d36da9929baa9d70ca90d90b969269e5a12d39c1e0d475010116 \ - --hash=sha256:4c2f0d35703d61002a2bbdcf15548ebb701cfdd83cdc12471d2bae80878a4207 \ - --hash=sha256:4fd871184321100fb400d759ad0cddddf284c4b696568204d281c902fc7b0d81 \ - --hash=sha256:5259cb659aa43005eb55a0e4ff2c825ca111a0da1814202c64d28a985d33b087 \ - --hash=sha256:57a51b89f954f216a81c9d057bf1a24e2f36e764a1ca9a501a6964eb4a6800dd \ - --hash=sha256:652627a055cb52a84f8c448185922241dd5217443ca194d5739b44612c5e6507 \ - --hash=sha256:67e120e9a577c64fe1f611e53b30b3e69744e5910ff3b6e97e935aeb96005858 \ - --hash=sha256:6af1c6387c531cd364b72c28daa29232162010d952ceb7e5ca8e2827526aceae \ - --hash=sha256:6d192741113ef5e30d89dcb5b956ef4e1578f304708701b8b73d38e3e1461f34 \ - --hash=sha256:7efe8041897fe7a50863e51b77789b657a133c75c3b094e51b5e4b5cec7bf906 \ - --hash=sha256:84537453d57f55a50a5b6835622ee405816999a7113267739a1b4581f83535bd \ - --hash=sha256:8f09daa483aedea50d249ef98ed500569841d6498aa9c9f4b0531b9964658922 \ - --hash=sha256:95dd7f261bb76948b52a5330ba5202b91a26fbac13ad0e9fc8a3ac04752058c7 \ - --hash=sha256:a74fbcdb2a0d46fe00504f571a2a540532f4c188e6ccf26f1f178480117b33c4 \ - --hash=sha256:a983e441a00a9d57a4d7c91b3116a37ae602907a7618b882c8013b5762e80574 \ - --hash=sha256:ab8de0d091acbf778f74286f4989cf3d1528336af1b59f3e5d2ebca8b5fe49e1 \ - --hash=sha256:aeb57c421b34af8f9fe830e1955bf493a86a7996cc1338fe41b30047d16e962c \ - --hash=sha256:ce785cf81a7bdade534297ef9e490ddff800d956625020ab2ec2780a556c313e \ - --hash=sha256:d0d651aa754ef58d75cec6edfbd21259d93810b73f6ec246436a21b7841908de +cryptography==41.0.4 \ + --hash=sha256:004b6ccc95943f6a9ad3142cfabcc769d7ee38a3f60fb0dddbfb431f818c3a67 \ + --hash=sha256:047c4603aeb4bbd8db2756e38f5b8bd7e94318c047cfe4efeb5d715e08b49311 \ + --hash=sha256:0d9409894f495d465fe6fda92cb70e8323e9648af912d5b9141d616df40a87b8 \ + --hash=sha256:23a25c09dfd0d9f28da2352503b23e086f8e78096b9fd585d1d14eca01613e13 \ + --hash=sha256:2ed09183922d66c4ec5fdaa59b4d14e105c084dd0febd27452de8f6f74704143 \ + --hash=sha256:35c00f637cd0b9d5b6c6bd11b6c3359194a8eba9c46d4e875a3660e3b400005f \ + --hash=sha256:37480760ae08065437e6573d14be973112c9e6dcaf5f11d00147ee74f37a3829 \ + --hash=sha256:3b224890962a2d7b57cf5eeb16ccaafba6083f7b811829f00476309bce2fe0fd \ + --hash=sha256:5a0f09cefded00e648a127048119f77bc2b2ec61e736660b5789e638f43cc397 \ + --hash=sha256:5b72205a360f3b6176485a333256b9bcd48700fc755fef51c8e7e67c4b63e3ac \ + --hash=sha256:7e53db173370dea832190870e975a1e09c86a879b613948f09eb49324218c14d \ + --hash=sha256:7febc3094125fc126a7f6fb1f420d0da639f3f32cb15c8ff0dc3997c4549f51a \ + --hash=sha256:80907d3faa55dc5434a16579952ac6da800935cd98d14dbd62f6f042c7f5e839 \ + --hash=sha256:86defa8d248c3fa029da68ce61fe735432b047e32179883bdb1e79ed9bb8195e \ + --hash=sha256:8ac4f9ead4bbd0bc8ab2d318f97d85147167a488be0e08814a37eb2f439d5cf6 \ + --hash=sha256:93530900d14c37a46ce3d6c9e6fd35dbe5f5601bf6b3a5c325c7bffc030344d9 \ + --hash=sha256:9eeb77214afae972a00dee47382d2591abe77bdae166bda672fb1e24702a3860 \ + --hash=sha256:b5f4dfe950ff0479f1f00eda09c18798d4f49b98f4e2006d644b3301682ebdca \ + --hash=sha256:c3391bd8e6de35f6f1140e50aaeb3e2b3d6a9012536ca23ab0d9c35ec18c8a91 \ + --hash=sha256:c880eba5175f4307129784eca96f4e70b88e57aa3f680aeba3bab0e980b0f37d \ + --hash=sha256:cecfefa17042941f94ab54f769c8ce0fe14beff2694e9ac684176a2535bf9714 \ + --hash=sha256:e40211b4923ba5a6dc9769eab704bdb3fbb58d56c5b336d30996c24fcf12aadb \ + --hash=sha256:efc8ad4e6fc4f1752ebfb58aefece8b4e3c4cae940b0994d43649bdfce8d0d4f # via # gcp-releasetool # secretstorage @@ -382,6 +382,7 @@ protobuf==3.20.3 \ # gcp-docuploader # gcp-releasetool # google-api-core + # googleapis-common-protos pyasn1==0.4.8 \ --hash=sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d \ --hash=sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba @@ -466,9 +467,9 @@ typing-extensions==4.4.0 \ --hash=sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa \ --hash=sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e # via -r requirements.in -urllib3==1.26.12 \ - --hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \ - --hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997 +urllib3==1.26.17 \ + --hash=sha256:24d6a242c28d29af46c3fae832c36db3bbebcc533dd1bb549172cd739c82df21 \ + --hash=sha256:94a757d178c9be92ef5539b8840d48dc9cf1b2709c9d6b588232a055c524458b # via # requests # twine diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 19409cb..6a8e169 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ repos: - id: end-of-file-fixer - id: check-yaml - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 23.7.0 hooks: - id: black - repo: https://github.com/pycqa/flake8 diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f80372a..8b673e3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.20.0" + ".": "3.20.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index c5875d9..f6c8b33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://pypi.org/project/google-cloud-build/#history +## [3.20.1](https://github.com/googleapis/python-cloudbuild/compare/v3.20.0...v3.20.1) (2023-10-09) + + +### Documentation + +* Minor formatting ([#433](https://github.com/googleapis/python-cloudbuild/issues/433)) ([165c6e7](https://github.com/googleapis/python-cloudbuild/commit/165c6e78c34cc30e7109598b3dc601998b7117b0)) + ## [3.20.0](https://github.com/googleapis/python-cloudbuild/compare/v3.19.0...v3.20.0) (2023-08-08) diff --git a/google/cloud/devtools/cloudbuild/gapic_version.py b/google/cloud/devtools/cloudbuild/gapic_version.py index 37656e7..72bf5f3 100644 --- a/google/cloud/devtools/cloudbuild/gapic_version.py +++ b/google/cloud/devtools/cloudbuild/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.20.0" # {x-release-please-version} +__version__ = "3.20.1" # {x-release-please-version} diff --git a/google/cloud/devtools/cloudbuild_v1/gapic_version.py b/google/cloud/devtools/cloudbuild_v1/gapic_version.py index 37656e7..72bf5f3 100644 --- a/google/cloud/devtools/cloudbuild_v1/gapic_version.py +++ b/google/cloud/devtools/cloudbuild_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.20.0" # {x-release-please-version} +__version__ = "3.20.1" # {x-release-please-version} diff --git a/google/cloud/devtools/cloudbuild_v1/services/cloud_build/async_client.py b/google/cloud/devtools/cloudbuild_v1/services/cloud_build/async_client.py index 9953ec4..8828bef 100644 --- a/google/cloud/devtools/cloudbuild_v1/services/cloud_build/async_client.py +++ b/google/cloud/devtools/cloudbuild_v1/services/cloud_build/async_client.py @@ -558,6 +558,7 @@ async def list_builds( metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListBuildsAsyncPager: r"""Lists previously requested builds. + Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully. @@ -612,6 +613,7 @@ async def sample_list_builds(): Returns: google.cloud.devtools.cloudbuild_v1.services.cloud_build.pagers.ListBuildsAsyncPager: Response including listed builds. + Iterating over this object will yield results and resolve additional pages automatically. @@ -1010,6 +1012,7 @@ async def approve_build( metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Approves or rejects a pending build. + If approved, the returned LRO will be analogous to the LRO returned from a CreateBuild call. diff --git a/google/cloud/devtools/cloudbuild_v1/services/cloud_build/client.py b/google/cloud/devtools/cloudbuild_v1/services/cloud_build/client.py index fb4e90d..c04862d 100644 --- a/google/cloud/devtools/cloudbuild_v1/services/cloud_build/client.py +++ b/google/cloud/devtools/cloudbuild_v1/services/cloud_build/client.py @@ -964,6 +964,7 @@ def list_builds( metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListBuildsPager: r"""Lists previously requested builds. + Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully. @@ -1018,6 +1019,7 @@ def sample_list_builds(): Returns: google.cloud.devtools.cloudbuild_v1.services.cloud_build.pagers.ListBuildsPager: Response including listed builds. + Iterating over this object will yield results and resolve additional pages automatically. @@ -1418,6 +1420,7 @@ def approve_build( metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Approves or rejects a pending build. + If approved, the returned LRO will be analogous to the LRO returned from a CreateBuild call. diff --git a/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/grpc.py b/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/grpc.py index 4fb6ebe..cce2211 100644 --- a/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/grpc.py +++ b/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/grpc.py @@ -319,6 +319,7 @@ def list_builds( r"""Return a callable for the list builds method over gRPC. Lists previously requested builds. + Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully. @@ -428,6 +429,7 @@ def approve_build( r"""Return a callable for the approve build method over gRPC. Approves or rejects a pending build. + If approved, the returned LRO will be analogous to the LRO returned from a CreateBuild call. diff --git a/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/grpc_asyncio.py b/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/grpc_asyncio.py index dadb593..76cca5b 100644 --- a/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/grpc_asyncio.py +++ b/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/grpc_asyncio.py @@ -328,6 +328,7 @@ def list_builds( r"""Return a callable for the list builds method over gRPC. Lists previously requested builds. + Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully. @@ -439,6 +440,7 @@ def approve_build( r"""Return a callable for the approve build method over gRPC. Approves or rejects a pending build. + If approved, the returned LRO will be analogous to the LRO returned from a CreateBuild call. diff --git a/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/rest.py b/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/rest.py index d61a5d5..0d2d16f 100644 --- a/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/rest.py +++ b/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/rest.py @@ -41,8 +41,8 @@ from google.cloud.devtools.cloudbuild_v1.types import cloudbuild -from google.longrunning import operations_pb2 # type: ignore from google.protobuf import empty_pb2 # type: ignore +from google.longrunning import operations_pb2 # type: ignore from .base import CloudBuildTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO diff --git a/google/cloud/devtools/cloudbuild_v1/types/cloudbuild.py b/google/cloud/devtools/cloudbuild_v1/types/cloudbuild.py index 1b7c699..047b825 100644 --- a/google/cloud/devtools/cloudbuild_v1/types/cloudbuild.py +++ b/google/cloud/devtools/cloudbuild_v1/types/cloudbuild.py @@ -255,6 +255,7 @@ class RepoSource(proto.Message): Name of the Cloud Source Repository. branch_name (str): Regex matching branches to build. + The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax @@ -262,6 +263,7 @@ class RepoSource(proto.Message): This field is a member of `oneof`_ ``revision``. tag_name (str): Regex matching tags to build. + The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax @@ -607,6 +609,7 @@ class BuildStep(proto.Message): be specified in the build's ``Secret``. volumes (MutableSequence[google.cloud.devtools.cloudbuild_v1.types.Volume]): List of volumes to mount into the build step. + Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are @@ -649,6 +652,7 @@ class BuildStep(proto.Message): take precedence. script (str): A shell script to be executed in the step. + When script is provided, the user cannot specify the entrypoint or args. automap_substitutions (bool): @@ -748,12 +752,14 @@ class Volume(proto.Message): Attributes: name (str): Name of the volume to mount. + Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps. path (str): Path at which to mount the volume. + Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths. @@ -1305,6 +1311,7 @@ class Artifacts(proto.Message): The images will be pushed using the builder service account's credentials. + The digests of the pushed images will be stored in the Build resource's results field. @@ -1314,6 +1321,7 @@ class Artifacts(proto.Message): A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. + Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service @@ -1329,6 +1337,7 @@ class Artifacts(proto.Message): A list of Maven artifacts to be uploaded to Artifact Registry upon successful completion of all build steps. + Artifacts in the workspace matching specified paths globs will be uploaded to the specified Artifact Registry repository using the builder @@ -1340,14 +1349,17 @@ class Artifacts(proto.Message): A list of Python packages to be uploaded to Artifact Registry upon successful completion of all build steps. + The build service account credentials will be used to perform the upload. + If any objects fail to be pushed, the build is marked FAILURE. npm_packages (MutableSequence[google.cloud.devtools.cloudbuild_v1.types.Artifacts.NpmPackage]): A list of npm packages to be uploaded to Artifact Registry upon successful completion of all build steps. + Npm packages in the specified paths will be uploaded to the specified Artifact Registry repository using the builder service account's @@ -1399,6 +1411,7 @@ class MavenArtifact(proto.Message): repository (str): Artifact Registry repository, in the form "https://$REGION-maven.pkg.dev/$PROJECT/$REPOSITORY" + Artifact in the workspace specified by path will be uploaded to Artifact Registry with this location as a prefix. @@ -1451,6 +1464,7 @@ class PythonPackage(proto.Message): repository (str): Artifact Registry repository, in the form "https://$REGION-python.pkg.dev/$PROJECT/$REPOSITORY" + Files in the workspace matching any path pattern will be uploaded to Artifact Registry with this location as a prefix. @@ -1477,6 +1491,7 @@ class NpmPackage(proto.Message): repository (str): Artifact Registry repository, in the form "https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY" + Npm package in the workspace specified by path will be zipped and uploaded to Artifact Registry with this location as a prefix. @@ -2754,6 +2769,7 @@ class PullRequestFilter(proto.Message): Attributes: branch (str): Regex of branches to match. + The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax @@ -2818,6 +2834,7 @@ class PushFilter(proto.Message): Attributes: branch (str): Regexes matching branches to build. + The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax @@ -2825,6 +2842,7 @@ class PushFilter(proto.Message): This field is a member of `oneof`_ ``git_ref``. tag (str): Regexes matching tags to build. + The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax @@ -3066,6 +3084,7 @@ class BuildOptions(proto.Message): Option to specify whether or not to apply bash style string operations to the substitutions. + NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file. @@ -3093,6 +3112,7 @@ class BuildOptions(proto.Message): in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. + The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". @@ -3547,9 +3567,8 @@ class WorkerPool(proto.Message): Output only. A unique identifier for the ``WorkerPool``. annotations (MutableMapping[str, str]): User specified annotations. See - https://google.aip.dev/128#annotations - for more details such as format and size - limitations. + https://google.aip.dev/128#annotations for more + details such as format and size limitations. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Time at which the request to create the ``WorkerPool`` was received. diff --git a/google/cloud/devtools/cloudbuild_v2/gapic_version.py b/google/cloud/devtools/cloudbuild_v2/gapic_version.py index 37656e7..72bf5f3 100644 --- a/google/cloud/devtools/cloudbuild_v2/gapic_version.py +++ b/google/cloud/devtools/cloudbuild_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.20.0" # {x-release-please-version} +__version__ = "3.20.1" # {x-release-please-version} diff --git a/google/cloud/devtools/cloudbuild_v2/services/repository_manager/async_client.py b/google/cloud/devtools/cloudbuild_v2/services/repository_manager/async_client.py index a179a94..a8cf789 100644 --- a/google/cloud/devtools/cloudbuild_v2/services/repository_manager/async_client.py +++ b/google/cloud/devtools/cloudbuild_v2/services/repository_manager/async_client.py @@ -50,7 +50,7 @@ from google.cloud.location import locations_pb2 # type: ignore from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore -from google.longrunning import operations_pb2 +from google.longrunning import operations_pb2 # type: ignore from google.protobuf import empty_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore diff --git a/google/cloud/devtools/cloudbuild_v2/services/repository_manager/client.py b/google/cloud/devtools/cloudbuild_v2/services/repository_manager/client.py index e3c0a66..7fbf2bf 100644 --- a/google/cloud/devtools/cloudbuild_v2/services/repository_manager/client.py +++ b/google/cloud/devtools/cloudbuild_v2/services/repository_manager/client.py @@ -54,7 +54,7 @@ from google.cloud.location import locations_pb2 # type: ignore from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore -from google.longrunning import operations_pb2 +from google.longrunning import operations_pb2 # type: ignore from google.protobuf import empty_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore diff --git a/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/base.py b/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/base.py index d7390a9..eedf13e 100644 --- a/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/base.py +++ b/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/base.py @@ -31,7 +31,6 @@ from google.cloud.location import locations_pb2 # type: ignore from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore -from google.longrunning import operations_pb2 from google.longrunning import operations_pb2 # type: ignore DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( diff --git a/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/grpc.py b/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/grpc.py index 4132d2f..88bfc06 100644 --- a/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/grpc.py +++ b/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/grpc.py @@ -29,7 +29,6 @@ from google.cloud.location import locations_pb2 # type: ignore from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore -from google.longrunning import operations_pb2 from google.longrunning import operations_pb2 # type: ignore from .base import RepositoryManagerTransport, DEFAULT_CLIENT_INFO diff --git a/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/grpc_asyncio.py b/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/grpc_asyncio.py index fa8bb5b..cd9c115 100644 --- a/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/grpc_asyncio.py +++ b/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/grpc_asyncio.py @@ -29,7 +29,6 @@ from google.cloud.location import locations_pb2 # type: ignore from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore -from google.longrunning import operations_pb2 from google.longrunning import operations_pb2 # type: ignore from .base import RepositoryManagerTransport, DEFAULT_CLIENT_INFO from .grpc import RepositoryManagerGrpcTransport diff --git a/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/rest.py b/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/rest.py index d174619..8a0f65c 100644 --- a/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/rest.py +++ b/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/rest.py @@ -31,7 +31,6 @@ from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore from google.cloud.location import locations_pb2 # type: ignore -from google.longrunning import operations_pb2 from requests import __version__ as requests_version import dataclasses import re @@ -2219,7 +2218,6 @@ def __call__( timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> policy_pb2.Policy: - r"""Call the get iam policy method over HTTP. Args: @@ -2286,7 +2284,6 @@ def __call__( timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> policy_pb2.Policy: - r"""Call the set iam policy method over HTTP. Args: @@ -2356,7 +2353,6 @@ def __call__( timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> iam_policy_pb2.TestIamPermissionsResponse: - r"""Call the test iam permissions method over HTTP. Args: @@ -2428,7 +2424,6 @@ def __call__( timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: - r"""Call the cancel operation method over HTTP. Args: @@ -2494,7 +2489,6 @@ def __call__( timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: - r"""Call the get operation method over HTTP. Args: diff --git a/noxfile.py b/noxfile.py index 2b3b1bf..54abbaa 100644 --- a/noxfile.py +++ b/noxfile.py @@ -17,22 +17,24 @@ # Generated by synthtool. DO NOT EDIT! from __future__ import absolute_import + import os import pathlib import re import shutil +from typing import Dict, List import warnings import nox FLAKE8_VERSION = "flake8==6.1.0" -BLACK_VERSION = "black==22.3.0" -ISORT_VERSION = "isort==5.10.1" +BLACK_VERSION = "black[jupyter]==23.7.0" +ISORT_VERSION = "isort==5.11.0" LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] DEFAULT_PYTHON_VERSION = "3.8" -UNIT_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11"] +UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.7", "3.8", "3.9", "3.10", "3.11"] UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", @@ -40,23 +42,23 @@ "pytest-cov", "pytest-asyncio", ] -UNIT_TEST_EXTERNAL_DEPENDENCIES = [] -UNIT_TEST_LOCAL_DEPENDENCIES = [] -UNIT_TEST_DEPENDENCIES = [] -UNIT_TEST_EXTRAS = [] -UNIT_TEST_EXTRAS_BY_PYTHON = {} - -SYSTEM_TEST_PYTHON_VERSIONS = ["3.8"] -SYSTEM_TEST_STANDARD_DEPENDENCIES = [ +UNIT_TEST_EXTERNAL_DEPENDENCIES: List[str] = [] +UNIT_TEST_LOCAL_DEPENDENCIES: List[str] = [] +UNIT_TEST_DEPENDENCIES: List[str] = [] +UNIT_TEST_EXTRAS: List[str] = [] +UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} + +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8"] +SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ "mock", "pytest", "google-cloud-testutils", ] -SYSTEM_TEST_EXTERNAL_DEPENDENCIES = [] -SYSTEM_TEST_LOCAL_DEPENDENCIES = [] -SYSTEM_TEST_DEPENDENCIES = [] -SYSTEM_TEST_EXTRAS = [] -SYSTEM_TEST_EXTRAS_BY_PYTHON = {} +SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = [] +SYSTEM_TEST_LOCAL_DEPENDENCIES: List[str] = [] +SYSTEM_TEST_DEPENDENCIES: List[str] = [] +SYSTEM_TEST_EXTRAS: List[str] = [] +SYSTEM_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -69,6 +71,7 @@ "lint_setup_py", "blacken", "docs", + "format", ] # Error if a python version is missing @@ -187,7 +190,6 @@ def unit(session): def install_systemtest_dependencies(session, *constraints): - # Use pre-release gRPC for system tests. # Exclude version 1.52.0rc1 which has a known issue. # See https://github.com/grpc/grpc/issues/32163 diff --git a/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v1.json b/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v1.json index 0857ed9..d2cbc0b 100644 --- a/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v1.json +++ b/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-build", - "version": "3.20.0" + "version": "3.20.1" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v2.json b/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v2.json index 7ae3efe..d0ca081 100644 --- a/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v2.json +++ b/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-build", - "version": "3.20.0" + "version": "3.20.1" }, "snippets": [ { diff --git a/tests/unit/gapic/cloudbuild_v1/test_cloud_build.py b/tests/unit/gapic/cloudbuild_v1/test_cloud_build.py index 2570d63..df79bd5 100644 --- a/tests/unit/gapic/cloudbuild_v1/test_cloud_build.py +++ b/tests/unit/gapic/cloudbuild_v1/test_cloud_build.py @@ -56,7 +56,7 @@ from google.cloud.devtools.cloudbuild_v1.services.cloud_build import pagers from google.cloud.devtools.cloudbuild_v1.services.cloud_build import transports from google.cloud.devtools.cloudbuild_v1.types import cloudbuild -from google.longrunning import operations_pb2 +from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account from google.protobuf import any_pb2 # type: ignore from google.protobuf import duration_pb2 # type: ignore diff --git a/tests/unit/gapic/cloudbuild_v2/test_repository_manager.py b/tests/unit/gapic/cloudbuild_v2/test_repository_manager.py index 6c49bc2..cbb3d46 100644 --- a/tests/unit/gapic/cloudbuild_v2/test_repository_manager.py +++ b/tests/unit/gapic/cloudbuild_v2/test_repository_manager.py @@ -62,7 +62,7 @@ from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import options_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore -from google.longrunning import operations_pb2 +from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account from google.protobuf import empty_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore