From 5dd097ac50b850f328d188b3a21c028dd4e4f22b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 9 Oct 2023 10:53:26 -0400 Subject: [PATCH] chore: [autoapprove] Update `black` and `isort` to latest versions (#546) Source-Link: https://github.com/googleapis/synthtool/commit/0c7b0333f44b2b7075447f43a121a12d15a7b76a Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:08e34975760f002746b1d8c86fdc90660be45945ee6d9db914d1508acdf9a547 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 4 +-- .kokoro/requirements.txt | 6 ++-- .pre-commit-config.yaml | 2 +- .../services/adaptation/transports/rest.py | 2 -- .../services/speech/transports/rest.py | 2 -- .../services/adaptation/transports/rest.py | 2 -- .../services/speech/transports/rest.py | 2 -- .../services/speech/transports/rest.py | 6 ---- noxfile.py | 36 ++++++++++--------- .../system/gapic/v1/test_system_speech_v1.py | 3 -- .../v1p1beta1/test_system_speech_v1p1beta1.py | 3 -- 11 files changed, 25 insertions(+), 43 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a9bdb1b7..dd98abbd 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:fac304457974bb530cc5396abd4ab25d26a469cd3bc97cbfb18c8d4324c584eb -# created: 2023-10-02T21:31:03.517640371Z + digest: sha256:08e34975760f002746b1d8c86fdc90660be45945ee6d9db914d1508acdf9a547 +# created: 2023-10-09T14:06:13.397766266Z diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index 96d593c8..0332d326 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -467,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 19409cbd..6a8e1695 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/google/cloud/speech_v1/services/adaptation/transports/rest.py b/google/cloud/speech_v1/services/adaptation/transports/rest.py index f69c48ff..d7a59060 100644 --- a/google/cloud/speech_v1/services/adaptation/transports/rest.py +++ b/google/cloud/speech_v1/services/adaptation/transports/rest.py @@ -1549,7 +1549,6 @@ def __call__( timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: - r"""Call the get operation method over HTTP. Args: @@ -1616,7 +1615,6 @@ def __call__( timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.ListOperationsResponse: - r"""Call the list operations method over HTTP. Args: diff --git a/google/cloud/speech_v1/services/speech/transports/rest.py b/google/cloud/speech_v1/services/speech/transports/rest.py index bfeb5c7c..9af99628 100644 --- a/google/cloud/speech_v1/services/speech/transports/rest.py +++ b/google/cloud/speech_v1/services/speech/transports/rest.py @@ -574,7 +574,6 @@ def __call__( timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: - r"""Call the get operation method over HTTP. Args: @@ -641,7 +640,6 @@ def __call__( timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.ListOperationsResponse: - r"""Call the list operations method over HTTP. Args: diff --git a/google/cloud/speech_v1p1beta1/services/adaptation/transports/rest.py b/google/cloud/speech_v1p1beta1/services/adaptation/transports/rest.py index 9e506b88..62dfcec2 100644 --- a/google/cloud/speech_v1p1beta1/services/adaptation/transports/rest.py +++ b/google/cloud/speech_v1p1beta1/services/adaptation/transports/rest.py @@ -1549,7 +1549,6 @@ def __call__( timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: - r"""Call the get operation method over HTTP. Args: @@ -1616,7 +1615,6 @@ def __call__( timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.ListOperationsResponse: - r"""Call the list operations method over HTTP. Args: diff --git a/google/cloud/speech_v1p1beta1/services/speech/transports/rest.py b/google/cloud/speech_v1p1beta1/services/speech/transports/rest.py index 95482fc7..f0d2bc4a 100644 --- a/google/cloud/speech_v1p1beta1/services/speech/transports/rest.py +++ b/google/cloud/speech_v1p1beta1/services/speech/transports/rest.py @@ -574,7 +574,6 @@ def __call__( timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: - r"""Call the get operation method over HTTP. Args: @@ -641,7 +640,6 @@ def __call__( timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.ListOperationsResponse: - r"""Call the list operations method over HTTP. Args: diff --git a/google/cloud/speech_v2/services/speech/transports/rest.py b/google/cloud/speech_v2/services/speech/transports/rest.py index b93b882e..79ab1ff7 100644 --- a/google/cloud/speech_v2/services/speech/transports/rest.py +++ b/google/cloud/speech_v2/services/speech/transports/rest.py @@ -3386,7 +3386,6 @@ def __call__( timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> locations_pb2.Location: - r"""Call the get location method over HTTP. Args: @@ -3453,7 +3452,6 @@ def __call__( timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> locations_pb2.ListLocationsResponse: - r"""Call the list locations method over HTTP. Args: @@ -3520,7 +3518,6 @@ def __call__( timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: - r"""Call the cancel operation method over HTTP. Args: @@ -3586,7 +3583,6 @@ def __call__( timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: - r"""Call the delete operation method over HTTP. Args: @@ -3649,7 +3645,6 @@ def __call__( timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: - r"""Call the get operation method over HTTP. Args: @@ -3716,7 +3711,6 @@ def __call__( timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.ListOperationsResponse: - r"""Call the list operations method over HTTP. Args: diff --git a/noxfile.py b/noxfile.py index 2b3b1bfa..54abbaab 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/tests/system/gapic/v1/test_system_speech_v1.py b/tests/system/gapic/v1/test_system_speech_v1.py index b39d333c..e2fc3b12 100644 --- a/tests/system/gapic/v1/test_system_speech_v1.py +++ b/tests/system/gapic/v1/test_system_speech_v1.py @@ -21,7 +21,6 @@ class TestSystemSpeech(object): def test_recognize(self): - try: BUCKET = os.environ["GOOGLE_CLOUD_TESTS_SPEECH_BUCKET"] except KeyError: @@ -43,7 +42,6 @@ def test_recognize(self): assert response.results[0].alternatives[0].transcript is not None def test_long_running_recognize(self): - try: BUCKET = os.environ["GOOGLE_CLOUD_TESTS_SPEECH_BUCKET"] except KeyError: @@ -65,7 +63,6 @@ def test_long_running_recognize(self): assert response.result() is not None def test_streaming_recognize(self): - try: BUCKET = os.environ["GOOGLE_CLOUD_TESTS_SPEECH_BUCKET"] except KeyError: diff --git a/tests/system/gapic/v1p1beta1/test_system_speech_v1p1beta1.py b/tests/system/gapic/v1p1beta1/test_system_speech_v1p1beta1.py index 13758df3..370768a9 100644 --- a/tests/system/gapic/v1p1beta1/test_system_speech_v1p1beta1.py +++ b/tests/system/gapic/v1p1beta1/test_system_speech_v1p1beta1.py @@ -21,7 +21,6 @@ class TestSystemSpeech(object): def test_recognize(self): - try: BUCKET = os.environ["GOOGLE_CLOUD_TESTS_SPEECH_BUCKET"] except KeyError: @@ -43,7 +42,6 @@ def test_recognize(self): assert response.results[0].alternatives[0].transcript is not None def test_long_running_recognize(self): - try: BUCKET = os.environ["GOOGLE_CLOUD_TESTS_SPEECH_BUCKET"] except KeyError: @@ -65,7 +63,6 @@ def test_long_running_recognize(self): assert response.result() is not None def test_streaming_recognize(self): - try: BUCKET = os.environ["GOOGLE_CLOUD_TESTS_SPEECH_BUCKET"] except KeyError: