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

Commit

Permalink
docs: fix docstring formatting (#140)
Browse files Browse the repository at this point in the history
* docs: fix docstring formatting

Committer: @parthea
PiperOrigin-RevId: 409547707

Source-Link: googleapis/googleapis@45a2c07

Source-Link: googleapis/googleapis-gen@99869d7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTk4NjlkN2FiZmZiNzc5MWEwN2IyMTRlYTNjNWYyY2MwMDNlYzBiMCJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* remove workarounds in owlbot.py

* run owlbot cli locally

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
3 people committed Nov 13, 2021
1 parent 5801bfd commit 57bf037
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ async def search_folders(
::
| Field | Description |
|-------------------------\|----------------------------------------|
|-------------------------|----------------------------------------|
| displayName | Filters by displayName. |
| parent | Filters by parent (for example: folders/123). |
| state, lifecycleState | Filters by state. |
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/resourcemanager_v3/services/folders/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ def search_folders(
::
| Field | Description |
|-------------------------\|----------------------------------------|
|-------------------------|----------------------------------------|
| displayName | Filters by displayName. |
| parent | Filters by parent (for example: folders/123). |
| state, lifecycleState | Filters by state. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ async def search_organizations(
::
| Field | Description |
|------------------\|--------------------------------------------|
|------------------|--------------------------------------------|
| directoryCustomerId, owner.directoryCustomerId | Filters by directory
customer id. |
| domain | Filters by domain. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def search_organizations(
::
| Field | Description |
|------------------\|--------------------------------------------|
|------------------|--------------------------------------------|
| directoryCustomerId, owner.directoryCustomerId | Filters by directory
customer id. |
| domain | Filters by domain. |
Expand Down
26 changes: 13 additions & 13 deletions google/cloud/resourcemanager_v3/services/projects/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ async def search_projects(
::
| Field | Description |
|-------------------------\|----------------------------------------------|
|-------------------------|----------------------------------------------|
| displayName, name | Filters by displayName. |
| parent | Project's parent. (for example: folders/123,
organizations/*) Prefer parent field over parent.type and parent.id. |
Expand All @@ -406,18 +406,18 @@ async def search_projects(
Some examples queries:
\| Query \| Description \|
\|------------------\|-----------------------------------------------------\|
\| name:how\* \| The project's name starts with "how".
\| \| name:Howl \| The project's name is ``Howl`` or
``howl``. \| \| name:HOWL \| Equivalent to above. \| \|
NAME:howl \| Equivalent to above. \| \| labels.color:\*
\| The project has the label ``color``. \| \|
labels.color:red \| The project's label ``color`` has
the value ``red``. \| \|
labels.color:red labels.size:big \| The project's label
``color`` has the value ``red`` and its label ``size``
has the value ``big``. \|
::
| Query | Description |
|------------------|-----------------------------------------------------|
| name:how* | The project's name starts with "how". |
| name:Howl | The project's name is `Howl` or `howl`. |
| name:HOWL | Equivalent to above. |
| NAME:howl | Equivalent to above. |
| labels.color:* | The project has the label `color`. |
| labels.color:red | The project's label `color` has the value `red`. |
| labels.color:red&nbsp;labels.size:big | The project's label `color` has
the value `red` and its label `size` has the value `big`. |
If no query is specified, the call will return projects
for which the user has the
Expand Down
26 changes: 13 additions & 13 deletions google/cloud/resourcemanager_v3/services/projects/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ def search_projects(
::
| Field | Description |
|-------------------------\|----------------------------------------------|
|-------------------------|----------------------------------------------|
| displayName, name | Filters by displayName. |
| parent | Project's parent. (for example: folders/123,
organizations/*) Prefer parent field over parent.type and parent.id. |
Expand All @@ -581,18 +581,18 @@ def search_projects(
Some examples queries:
\| Query \| Description \|
\|------------------\|-----------------------------------------------------\|
\| name:how\* \| The project's name starts with "how".
\| \| name:Howl \| The project's name is ``Howl`` or
``howl``. \| \| name:HOWL \| Equivalent to above. \| \|
NAME:howl \| Equivalent to above. \| \| labels.color:\*
\| The project has the label ``color``. \| \|
labels.color:red \| The project's label ``color`` has
the value ``red``. \| \|
labels.color:red labels.size:big \| The project's label
``color`` has the value ``red`` and its label ``size``
has the value ``big``. \|
::
| Query | Description |
|------------------|-----------------------------------------------------|
| name:how* | The project's name starts with "how". |
| name:Howl | The project's name is `Howl` or `howl`. |
| name:HOWL | Equivalent to above. |
| NAME:howl | Equivalent to above. |
| labels.color:* | The project has the label `color`. |
| labels.color:red | The project's label `color` has the value `red`. |
| labels.color:red&nbsp;labels.size:big | The project's label `color` has
the value `red` and its label `size` has the value `big`. |
If no query is specified, the call will return projects
for which the user has the
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/resourcemanager_v3/types/folders.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class SearchFoldersRequest(proto.Message):
::
| Field | Description |
|-------------------------\|----------------------------------------|
|-------------------------|----------------------------------------|
| displayName | Filters by displayName. |
| parent | Filters by parent (for example: folders/123). |
| state, lifecycleState | Filters by state. |
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/resourcemanager_v3/types/organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class SearchOrganizationsRequest(proto.Message):
::
| Field | Description |
|------------------\|--------------------------------------------|
|------------------|--------------------------------------------|
| directoryCustomerId, owner.directoryCustomerId | Filters by directory
customer id. |
| domain | Filters by domain. |
Expand Down
25 changes: 13 additions & 12 deletions google/cloud/resourcemanager_v3/types/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class SearchProjectsRequest(proto.Message):
::
| Field | Description |
|-------------------------\|----------------------------------------------|
|-------------------------|----------------------------------------------|
| displayName, name | Filters by displayName. |
| parent | Project's parent. (for example: folders/123,
organizations/*) Prefer parent field over parent.type and parent.id. |
Expand All @@ -246,17 +246,18 @@ class SearchProjectsRequest(proto.Message):
Some examples queries:
\| Query \| Description \|
\|------------------\|-----------------------------------------------------\|
\| name:how\* \| The project's name starts with "how". \| \|
name:Howl \| The project's name is ``Howl`` or ``howl``. \|
\| name:HOWL \| Equivalent to above. \| \| NAME:howl \|
Equivalent to above. \| \| labels.color:\* \| The project
has the label ``color``. \| \| labels.color:red \| The
project's label ``color`` has the value ``red``. \| \|
labels.color:red labels.size:big \| The project's label
``color`` has the value ``red`` and its label ``size`` has
the value ``big``. \|
::
| Query | Description |
|------------------|-----------------------------------------------------|
| name:how* | The project's name starts with "how". |
| name:Howl | The project's name is `Howl` or `howl`. |
| name:HOWL | Equivalent to above. |
| NAME:howl | Equivalent to above. |
| labels.color:* | The project has the label `color`. |
| labels.color:red | The project's label `color` has the value `red`. |
| labels.color:red&nbsp;labels.size:big | The project's label `color` has
the value `red` and its label `size` has the value `big`. |
If no query is specified, the call will return projects for
which the user has the ``resourcemanager.projects.get``
Expand Down
43 changes: 0 additions & 43 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,49 +23,6 @@
default_version = "v3"

for library in s.get_staging_dirs(default_version):
# Resolve sphinx warning `Inline substitution_reference start-string without end-string`
# Remove tables from docstring. Requested change upstream in cl/377766167 due to https://google.aip.dev/192#formatting.
s.replace(
[
library / f"google/cloud/resourcemanager_{library.name}/services/folders/*client.py",
library / f"google/cloud/resourcemanager_{library.name}/types/folders.py"
],
"-------------------------[|]----------------------------------------",
"-------------------------\|----------------------------------------"
)
s.replace(
[
library / f"google/cloud/resourcemanager_{library.name}/services/organizations/*client.py",
library / f"google/cloud/resourcemanager_{library.name}/types/organizations.py"
],
"------------------[|]--------------------------------------------",
"------------------\|--------------------------------------------"
)
s.replace(
[
library / f"google/cloud/resourcemanager_{library.name}/services/projects/*client.py",
library / f"google/cloud/resourcemanager_{library.name}/types/projects.py"
],
"-------------------------[|]----------------------------------------------",
"-------------------------\|----------------------------------------------"
)
s.replace(
[
library / f"google/cloud/resourcemanager_{library.name}/services/projects/*client.py",
library / f"google/cloud/resourcemanager_{library.name}/types/projects.py"
],
"------------------[|]-----------------------------------------------------",
"------------------\|-----------------------------------------------------"
)

# Work around gapic generator bug https://github.com/googleapis/gapic-generator-python/issues/902
s.replace(library / f"google/cloud/resourcemanager_{library.name}/types/folders.py",
r""".
Attributes:""",
r""".\n
Attributes:""",
)

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

s.remove_staging_dirs()
Expand Down

0 comments on commit 57bf037

Please sign in to comment.