Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

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

Committer: @parthea
PiperOrigin-RevId: 410919520

Source-Link: googleapis/googleapis@b5274f7

Source-Link: googleapis/googleapis-gen@a179eef
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTE3OWVlZmIzYjMyODk3ZDc1YzUzZDgzNDlmMjM5MTBjNzc1MzA1MCJ9

* 🦉 Updates from OwlBot

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

* remove replacements 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 19, 2021
1 parent bb07b85 commit e7a3461
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 27 deletions.
8 changes: 4 additions & 4 deletions google/cloud/tasks_v2/types/target.py
Expand Up @@ -120,8 +120,8 @@ class HttpRequest(proto.Message):
[HttpRequest.url][google.cloud.tasks.v2.HttpRequest.url].
- Content-Length: This will be computed by Cloud Tasks.
- User-Agent: This will be set to ``"Google-Cloud-Tasks"``.
- X-Google-\*: Google use only.
- X-AppEngine-\*: Google use only.
- ``X-Google-*``: Google use only.
- ``X-AppEngine-*``: Google use only.
``Content-Type`` won't be set by Cloud Tasks. You can
explicitly set ``Content-Type`` to a media type when the
Expand Down Expand Up @@ -303,8 +303,8 @@ class AppEngineHttpRequest(proto.Message):
The headers below cannot be set or overridden:
- ``Host``
- ``X-Google-\*``
- ``X-AppEngine-\*``
- ``X-Google-*``
- ``X-AppEngine-*``
In addition, Cloud Tasks sets some headers when the task is
dispatched, such as headers containing information about the
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/tasks_v2beta2/types/target.py
Expand Up @@ -251,8 +251,8 @@ class AppEngineHttpRequest(proto.Message):
The headers below cannot be set or overridden:
- ``Host``
- ``X-Google-\*``
- ``X-AppEngine-\*``
- ``X-Google-*``
- ``X-AppEngine-*``
In addition, Cloud Tasks sets some headers when the task is
dispatched, such as headers containing information about the
Expand Down
8 changes: 4 additions & 4 deletions google/cloud/tasks_v2beta3/types/target.py
Expand Up @@ -154,8 +154,8 @@ class HttpRequest(proto.Message):
[HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url].
- Content-Length: This will be computed by Cloud Tasks.
- User-Agent: This will be set to ``"Google-Cloud-Tasks"``.
- X-Google-\*: Google use only.
- X-AppEngine-\*: Google use only.
- ``X-Google-*``: Google use only.
- ``X-AppEngine-*``: Google use only.
``Content-Type`` won't be set by Cloud Tasks. You can
explicitly set ``Content-Type`` to a media type when the
Expand Down Expand Up @@ -373,8 +373,8 @@ class AppEngineHttpRequest(proto.Message):
The headers below cannot be set or overridden:
- ``Host``
- ``X-Google-\*``
- ``X-AppEngine-\*``
- ``X-Google-*``
- ``X-AppEngine-*``
In addition, Cloud Tasks sets some headers when the task is
dispatched, such as headers containing information about the
Expand Down
17 changes: 0 additions & 17 deletions owlbot.py
Expand Up @@ -26,23 +26,6 @@
default_version = "v2"

for library in s.get_staging_dirs(default_version):
# Fix docstring.
s.replace(library / "google/cloud/*/types/target.py", "X-Google-\*", "X-Google-\\*")
s.replace(library / "google/cloud/*/types/target.py", "X-AppEngine-\*", "X-AppEngine-\\*")

# Comment out broken assertion in unit test
# https://github.com/googleapis/gapic-generator-python/issues/897
s.replace(
library / "tests/**/test_cloud_tasks.py",
"assert args\[0\]\.lease_duration == duration_pb2\.Duration\(seconds=751\)",
"# assert args[0].lease_duration == duration_pb2.Duration(seconds=751)"
)
s.replace(
library / "tests/**/test_cloud_tasks.py",
"assert args\[0\].schedule_time == timestamp_pb2\.Timestamp\(seconds=751\)",
"# assert args[0].schedule_time == timestamp_pb2.Timestamp(seconds=751)"
)

excludes = ["README.rst", "setup.py", "nox*.py", "docs/index.rst", "*.tar.gz"]
s.copy(library, excludes=excludes)

Expand Down

0 comments on commit e7a3461

Please sign in to comment.