Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
docs: fix docstring formatting (#147)
- [ ] Regenerate this pull request now.

Committer: @parthea
PiperOrigin-RevId: 406921699

Source-Link: googleapis/googleapis@6d008d2

Source-Link: googleapis/googleapis-gen@6f690ab
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmY2OTBhYmE5MmMyOTkxYWNjNWNjMDI4M2FkOTk5NTRiMTYzZGY5NSJ9
  • Loading branch information
gcf-owl-bot[bot] committed Nov 2, 2021
1 parent 55a42ff commit bb0fc1a
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 71 deletions.
12 changes: 6 additions & 6 deletions google/cloud/recommender_v1/services/recommender/async_client.py
Expand Up @@ -691,8 +691,8 @@ async def mark_recommendation_claimed(
state_metadata (:class:`Sequence[google.cloud.recommender_v1.types.MarkRecommendationClaimedRequest.StateMetadataEntry]`):
State properties to include with this state. Overwrites
any existing ``state_metadata``. Keys must match the
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match
the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must
match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
This corresponds to the ``state_metadata`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down Expand Up @@ -800,8 +800,8 @@ async def mark_recommendation_succeeded(
state_metadata (:class:`Sequence[google.cloud.recommender_v1.types.MarkRecommendationSucceededRequest.StateMetadataEntry]`):
State properties to include with this state. Overwrites
any existing ``state_metadata``. Keys must match the
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match
the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must
match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
This corresponds to the ``state_metadata`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down Expand Up @@ -909,8 +909,8 @@ async def mark_recommendation_failed(
state_metadata (:class:`Sequence[google.cloud.recommender_v1.types.MarkRecommendationFailedRequest.StateMetadataEntry]`):
State properties to include with this state. Overwrites
any existing ``state_metadata``. Keys must match the
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match
the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must
match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
This corresponds to the ``state_metadata`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down
12 changes: 6 additions & 6 deletions google/cloud/recommender_v1/services/recommender/client.py
Expand Up @@ -888,8 +888,8 @@ def mark_recommendation_claimed(
state_metadata (Sequence[google.cloud.recommender_v1.types.MarkRecommendationClaimedRequest.StateMetadataEntry]):
State properties to include with this state. Overwrites
any existing ``state_metadata``. Keys must match the
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match
the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must
match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
This corresponds to the ``state_metadata`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down Expand Up @@ -1000,8 +1000,8 @@ def mark_recommendation_succeeded(
state_metadata (Sequence[google.cloud.recommender_v1.types.MarkRecommendationSucceededRequest.StateMetadataEntry]):
State properties to include with this state. Overwrites
any existing ``state_metadata``. Keys must match the
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match
the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must
match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
This corresponds to the ``state_metadata`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down Expand Up @@ -1112,8 +1112,8 @@ def mark_recommendation_failed(
state_metadata (Sequence[google.cloud.recommender_v1.types.MarkRecommendationFailedRequest.StateMetadataEntry]):
State properties to include with this state. Overwrites
any existing ``state_metadata``. Keys must match the
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match
the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must
match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
This corresponds to the ``state_metadata`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down
38 changes: 29 additions & 9 deletions google/cloud/recommender_v1/types/recommendation.py
Expand Up @@ -212,15 +212,35 @@ class Operation(proto.Message):
intended to be an exact match per filter. To perform
advanced matching, use path_value_matchers.
- Example: ``{ "/versions/*/name" : "it-123"
"/versions/*/targetSize/percent": 20 }``
- Example: ``{ "/bindings/*/role": "roles/owner"
"/bindings/*/condition" : null }``
- Example: ``{ "/bindings/*/role": "roles/owner"
"/bindings/*/members/*" : ["x@example.com",
"y@example.com"] }`` When both path_filters and
path_value_matchers are set, an implicit AND must be
performed.
- Example:
::
{
"/versions/*/name" : "it-123"
"/versions/*/targetSize/percent": 20
}
- Example:
::
{
"/bindings/*/role": "roles/owner"
"/bindings/*/condition" : null
}
- Example:
::
{
"/bindings/*/role": "roles/owner"
"/bindings/*/members/*" : ["x@example.com", "y@example.com"]
}
When both path_filters and path_value_matchers are set, an
implicit AND must be performed.
path_value_matchers (Sequence[google.cloud.recommender_v1.types.Operation.PathValueMatchersEntry]):
Similar to path_filters, this contains set of filters to
apply if ``path`` field referes to array elements. This is
Expand Down
12 changes: 6 additions & 6 deletions google/cloud/recommender_v1/types/recommender_service.py
Expand Up @@ -206,8 +206,8 @@ class MarkRecommendationClaimedRequest(proto.Message):
state_metadata (Sequence[google.cloud.recommender_v1.types.MarkRecommendationClaimedRequest.StateMetadataEntry]):
State properties to include with this state. Overwrites any
existing ``state_metadata``. Keys must match the regex
``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the regex
``/^[a-zA-Z0-9_./-]{0,255}$/``.
``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the
regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
etag (str):
Required. Fingerprint of the Recommendation.
Provides optimistic locking.
Expand All @@ -227,8 +227,8 @@ class MarkRecommendationSucceededRequest(proto.Message):
state_metadata (Sequence[google.cloud.recommender_v1.types.MarkRecommendationSucceededRequest.StateMetadataEntry]):
State properties to include with this state. Overwrites any
existing ``state_metadata``. Keys must match the regex
``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the regex
``/^[a-zA-Z0-9_./-]{0,255}$/``.
``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the
regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
etag (str):
Required. Fingerprint of the Recommendation.
Provides optimistic locking.
Expand All @@ -248,8 +248,8 @@ class MarkRecommendationFailedRequest(proto.Message):
state_metadata (Sequence[google.cloud.recommender_v1.types.MarkRecommendationFailedRequest.StateMetadataEntry]):
State properties to include with this state. Overwrites any
existing ``state_metadata``. Keys must match the regex
``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the regex
``/^[a-zA-Z0-9_./-]{0,255}$/``.
``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the
regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
etag (str):
Required. Fingerprint of the Recommendation.
Provides optimistic locking.
Expand Down
Expand Up @@ -691,8 +691,8 @@ async def mark_recommendation_claimed(
state_metadata (:class:`Sequence[google.cloud.recommender_v1beta1.types.MarkRecommendationClaimedRequest.StateMetadataEntry]`):
State properties to include with this state. Overwrites
any existing ``state_metadata``. Keys must match the
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match
the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must
match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
This corresponds to the ``state_metadata`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down Expand Up @@ -800,8 +800,8 @@ async def mark_recommendation_succeeded(
state_metadata (:class:`Sequence[google.cloud.recommender_v1beta1.types.MarkRecommendationSucceededRequest.StateMetadataEntry]`):
State properties to include with this state. Overwrites
any existing ``state_metadata``. Keys must match the
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match
the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must
match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
This corresponds to the ``state_metadata`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down Expand Up @@ -909,8 +909,8 @@ async def mark_recommendation_failed(
state_metadata (:class:`Sequence[google.cloud.recommender_v1beta1.types.MarkRecommendationFailedRequest.StateMetadataEntry]`):
State properties to include with this state. Overwrites
any existing ``state_metadata``. Keys must match the
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match
the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must
match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
This corresponds to the ``state_metadata`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down
12 changes: 6 additions & 6 deletions google/cloud/recommender_v1beta1/services/recommender/client.py
Expand Up @@ -888,8 +888,8 @@ def mark_recommendation_claimed(
state_metadata (Sequence[google.cloud.recommender_v1beta1.types.MarkRecommendationClaimedRequest.StateMetadataEntry]):
State properties to include with this state. Overwrites
any existing ``state_metadata``. Keys must match the
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match
the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must
match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
This corresponds to the ``state_metadata`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down Expand Up @@ -1000,8 +1000,8 @@ def mark_recommendation_succeeded(
state_metadata (Sequence[google.cloud.recommender_v1beta1.types.MarkRecommendationSucceededRequest.StateMetadataEntry]):
State properties to include with this state. Overwrites
any existing ``state_metadata``. Keys must match the
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match
the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must
match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
This corresponds to the ``state_metadata`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down Expand Up @@ -1112,8 +1112,8 @@ def mark_recommendation_failed(
state_metadata (Sequence[google.cloud.recommender_v1beta1.types.MarkRecommendationFailedRequest.StateMetadataEntry]):
State properties to include with this state. Overwrites
any existing ``state_metadata``. Keys must match the
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match
the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
regex ``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must
match the regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
This corresponds to the ``state_metadata`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down
38 changes: 29 additions & 9 deletions google/cloud/recommender_v1beta1/types/recommendation.py
Expand Up @@ -212,15 +212,35 @@ class Operation(proto.Message):
intended to be an exact match per filter. To perform
advanced matching, use path_value_matchers.
- Example: ``{ "/versions/*/name" : "it-123"
"/versions/*/targetSize/percent": 20 }``
- Example: ``{ "/bindings/*/role": "roles/owner"
"/bindings/*/condition" : null }``
- Example: ``{ "/bindings/*/role": "roles/owner"
"/bindings/*/members/*" : ["x@example.com",
"y@example.com"] }`` When both path_filters and
path_value_matchers are set, an implicit AND must be
performed.
- Example:
::
{
"/versions/*/name" : "it-123"
"/versions/*/targetSize/percent": 20
}
- Example:
::
{
"/bindings/*/role": "roles/owner"
"/bindings/*/condition" : null
}
- Example:
::
{
"/bindings/*/role": "roles/owner"
"/bindings/*/members/*" : ["x@example.com", "y@example.com"]
}
When both path_filters and path_value_matchers are set, an
implicit AND must be performed.
path_value_matchers (Sequence[google.cloud.recommender_v1beta1.types.Operation.PathValueMatchersEntry]):
Similar to path_filters, this contains set of filters to
apply if ``path`` field referes to array elements. This is
Expand Down
12 changes: 6 additions & 6 deletions google/cloud/recommender_v1beta1/types/recommender_service.py
Expand Up @@ -206,8 +206,8 @@ class MarkRecommendationClaimedRequest(proto.Message):
state_metadata (Sequence[google.cloud.recommender_v1beta1.types.MarkRecommendationClaimedRequest.StateMetadataEntry]):
State properties to include with this state. Overwrites any
existing ``state_metadata``. Keys must match the regex
``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the regex
``/^[a-zA-Z0-9_./-]{0,255}$/``.
``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the
regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
etag (str):
Required. Fingerprint of the Recommendation.
Provides optimistic locking.
Expand All @@ -227,8 +227,8 @@ class MarkRecommendationSucceededRequest(proto.Message):
state_metadata (Sequence[google.cloud.recommender_v1beta1.types.MarkRecommendationSucceededRequest.StateMetadataEntry]):
State properties to include with this state. Overwrites any
existing ``state_metadata``. Keys must match the regex
``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the regex
``/^[a-zA-Z0-9_./-]{0,255}$/``.
``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the
regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
etag (str):
Required. Fingerprint of the Recommendation.
Provides optimistic locking.
Expand All @@ -248,8 +248,8 @@ class MarkRecommendationFailedRequest(proto.Message):
state_metadata (Sequence[google.cloud.recommender_v1beta1.types.MarkRecommendationFailedRequest.StateMetadataEntry]):
State properties to include with this state. Overwrites any
existing ``state_metadata``. Keys must match the regex
``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the regex
``/^[a-zA-Z0-9_./-]{0,255}$/``.
``/^[a-z0-9][a-z0-9_.-]{0,62}$/``. Values must match the
regex ``/^[a-zA-Z0-9_./-]{0,255}$/``.
etag (str):
Required. Fingerprint of the Recommendation.
Provides optimistic locking.
Expand Down
17 changes: 0 additions & 17 deletions owlbot.py
Expand Up @@ -24,23 +24,6 @@
default_version = "v1"

for library in s.get_staging_dirs(default_version):
# Fix docstring with regex pattern that breaks docgen
s.replace(library / "google/**/*client.py", "(/\^.*\$/)", "``\g<1>``")

# Fix more regex in docstrings
s.replace(library / "google/**/types/*.py",
"(regex\s+)(/.*?/)\.",
"\g<1>``\g<2>``.",
flags=re.MULTILINE | re.DOTALL,
)

# Fix docstring with JSON example by wrapping with backticks
s.replace(library / "google/**/types/recommendation.py",
"( - Example: )(\{.*?\})",
"\g<1>``\g<2>``",
flags=re.MULTILINE | re.DOTALL,
)

s.move(library, excludes=["docs/index.rst", "README.rst", "setup.py"])

s.remove_staging_dirs()
Expand Down

0 comments on commit bb0fc1a

Please sign in to comment.