Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Merge branch 'main' into treat-warnings-as-errors
Browse files Browse the repository at this point in the history
  • Loading branch information
parthea authored Nov 29, 2023
2 parents 0ff1963 + 78d90a3 commit 5f585e2
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 19 deletions.
4 changes: 4 additions & 0 deletions .github/.OwlBot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest

# See https://github.com/googleapis/python-org-policy/issues/22
deep-preserve-regex:
- /owl-bot-staging/v1

deep-remove-regex:
- /owl-bot-staging

Expand Down
34 changes: 17 additions & 17 deletions google/cloud/orgpolicy_v2/services/org_policy/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
from google.api_core.client_options import ClientOptions
from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
from google.api_core import retry as retries
from google.api_core import retry_async as retries
from google.auth import credentials as ga_credentials # type: ignore
from google.oauth2 import service_account # type: ignore

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
OptionalRetry = Union[retries.AsyncRetry, gapic_v1.method._MethodDefault]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore
OptionalRetry = Union[retries.AsyncRetry, object] # type: ignore

from google.cloud.orgpolicy_v2.services.org_policy import pagers
from google.cloud.orgpolicy_v2.types import constraint
Expand Down Expand Up @@ -288,7 +288,7 @@ async def sample_list_constraints():
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
Expand Down Expand Up @@ -325,7 +325,7 @@ async def sample_list_constraints():
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.list_constraints,
default_retry=retries.Retry(
default_retry=retries.AsyncRetry(
initial=1.0,
maximum=10.0,
multiplier=1.3,
Expand Down Expand Up @@ -422,7 +422,7 @@ async def sample_list_policies():
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
Expand Down Expand Up @@ -460,7 +460,7 @@ async def sample_list_policies():
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.list_policies,
default_retry=retries.Retry(
default_retry=retries.AsyncRetry(
initial=1.0,
maximum=10.0,
multiplier=1.3,
Expand Down Expand Up @@ -552,7 +552,7 @@ async def sample_get_policy():
This corresponds to the ``name`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
Expand Down Expand Up @@ -585,7 +585,7 @@ async def sample_get_policy():
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.get_policy,
default_retry=retries.Retry(
default_retry=retries.AsyncRetry(
initial=1.0,
maximum=10.0,
multiplier=1.3,
Expand Down Expand Up @@ -670,7 +670,7 @@ async def sample_get_effective_policy():
This corresponds to the ``name`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
Expand Down Expand Up @@ -703,7 +703,7 @@ async def sample_get_effective_policy():
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.get_effective_policy,
default_retry=retries.Retry(
default_retry=retries.AsyncRetry(
initial=1.0,
maximum=10.0,
multiplier=1.3,
Expand Down Expand Up @@ -800,7 +800,7 @@ async def sample_create_policy():
This corresponds to the ``policy`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
Expand Down Expand Up @@ -835,7 +835,7 @@ async def sample_create_policy():
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.create_policy,
default_retry=retries.Retry(
default_retry=retries.AsyncRetry(
initial=1.0,
maximum=10.0,
multiplier=1.3,
Expand Down Expand Up @@ -921,7 +921,7 @@ async def sample_update_policy():
This corresponds to the ``policy`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
Expand Down Expand Up @@ -954,7 +954,7 @@ async def sample_update_policy():
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.update_policy,
default_retry=retries.Retry(
default_retry=retries.AsyncRetry(
initial=1.0,
maximum=10.0,
multiplier=1.3,
Expand Down Expand Up @@ -1037,7 +1037,7 @@ async def sample_delete_policy():
This corresponds to the ``name`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
Expand All @@ -1064,7 +1064,7 @@ async def sample_delete_policy():
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.delete_policy,
default_retry=retries.Retry(
default_retry=retries.AsyncRetry(
initial=1.0,
maximum=10.0,
multiplier=1.3,
Expand Down
2 changes: 1 addition & 1 deletion owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
if clean_up_generated_samples:
shutil.rmtree("samples/generated_samples", ignore_errors=True)
clean_up_generated_samples = False
s.move([library], excludes=["**/gapic_version.py", "noxfile.py"])
s.move([library], excludes=["**/gapic_version.py", "noxfile.py", "tests/__init__.py"])
s.remove_staging_dirs()

# Clean up googleapis
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-org-policy",
"version": "1.8.3"
"version": "0.1.0"
},
"snippets": [
{
Expand Down

0 comments on commit 5f585e2

Please sign in to comment.