Skip to content

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 6851470 commit 812a92d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 27 deletions.
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 packages/google-cloud-tasks/owlbot.py
Original file line number Diff line number Diff line change
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 812a92d

Please sign in to comment.