Skip to content

Commit

Permalink
fix: Typecheck errors in samples/snippets/subscriber.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mukund-ananthu committed Jun 7, 2024
1 parent cfd7926 commit 0b19502
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion samples/snippets/mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ strict = True
exclude = noxfile\.py
warn_unused_configs = True

[mypy-avro.*,backoff,flaky]
; Ignore errors caused due to missing library stubs or py.typed marker
; Refer https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-library-stubs-or-py-typed-marker
[mypy-avro.*,backoff,flaky,google.cloud.*]
ignore_missing_imports = True
4 changes: 2 additions & 2 deletions samples/snippets/subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ def update_subscription_with_dead_letter_policy(
)

with subscriber:
subscription_after_update = subscriber.update_subscription(
subscription_after_update: gapic_types.Subscription = subscriber.update_subscription(
request={"subscription": subscription, "update_mask": update_mask}
)

Expand Down Expand Up @@ -573,7 +573,7 @@ def remove_dead_letter_policy(
)

with subscriber:
subscription_after_update = subscriber.update_subscription(
subscription_after_update: gapic_types.Subscription = subscriber.update_subscription(
request={"subscription": subscription, "update_mask": update_mask}
)

Expand Down

0 comments on commit 0b19502

Please sign in to comment.